Advertisement

03.11.2008 at 07:20AM PDT, ID: 23231756
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

How to use the round function in Excel using vbscript.....

Asked by Schurink in VB Script, Miscellaneous Programming, Microsoft Excel Spreadsheet Software

Tags:

Hi all,
I have this little part of my vbscript where i would like to use the round function for Excel, but it is not working. Must be a small little thing, but i cant figure where it is.  
Displayed error:   "Uknown Runtime Error"
This is the part of the code that is relevant:

objWS.Cells(2,"F").Formula = "=ROUND(AVERAGE(C2:C100);2)"


Any of you knows where is the problem?

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Set objwsheet = ExcelAddSheet("Summary")
	Set objWS = objWB.Sheets("Summary")
	
		objWS.Cells(1,"A").Value = "Date"
		objWS.Cells(1,"B").Value = "Time"
		objWS.Cells(1,"C").Value = "Sessions"	
		objWS.Cells(1,"E").Value = "Maximum"
		objWS.Cells(1,"F").Value = "Average Usage"	
		objWS.Range("A1:Z1").Font.Bold = True
		
		intNextRow = objWS.Cells(65536, "A").End(xlUp).Row + 1
		objWS.Cells(intNextRow, "A").Value = Date()
		objWS.Cells(intNextRow, "B").Value = DatePart("h", Now) & ":" & DatePart("n", Now)
		objWS.Cells(intNextRow, "C").Value = theFarm.Sessions.count
		objWS.Cells(2,"E").Formula = "=MAX(C2:C" & intNextRow & ")" 
		objWS.Cells(2,"F").Formula = "=ROUND(AVERAGE(C2:C100);2)" 
		
		objWS.Columns.AutoFit()
[+][-]03.11.2008 at 07:26AM PDT, ID: 21095988

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Miscellaneous Programming, Microsoft Excel Spreadsheet Software
Tags: Excel vbscript function
Sign Up Now!
Solution Provided By: rorya
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.11.2008 at 01:48PM PDT, ID: 21100149

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.11.2008 at 04:01PM PDT, ID: 21101339

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.11.2008 at 04:05PM PDT, ID: 21101358

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628