Thread: VB Code help
View Single Post
  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Chris,

Try this:
....Format((RunningTotal / Selection.Count), "0.000")...
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Christopher Anderson" wrote
in message ...
Here is a portion of one of my VB Macros in Excel:

If Selection.Count 0 Then
MsgBox ("Average = ") & (RunningTotal / Selection.Count),
vbInformation,
"Average"
End If

My question: How do I format the number (RunningTotal/Selection.Count) to
look like 0.000, instead of 0.0000000000000000?? What should my code look
like with the new formatting.

Thanks

Chris