View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Rounding formulas

an example and clarification of what 'to an interval' means
would have heloped but here are 2 possibles:-


Range("A1").Value = Round((Range("G8").Value * Range("H8").Value),
Range("C4").Value)

Range("A1").Value = WorksheetFunction.RoundDown((Range("G8").Value *
Range("H8").Value), Range("C4").Value)



Mike

"pdberger" wrote:

Good morning.

I want the workbook user to be able to round values -- either up to a
selected interval, down, or to the nearest. The only related VBA function
I'm able to find is rounding to a number of digits. For example, I want to
multiply [G8] x [H8], and round to an interval stored in [C4].

Can I accomplish this directly in a VBA statement?

Thanks in advance.