View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default RoundUp not working in VBA

I just did this and got 1

Sub rr()
cost = 1
follow_up = 0.5
x = Application.WorksheetFunction.RoundUp((cost * follow_up), 0)
MsgBox x
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
Can anyone provide insight into why the following is not working?

x = Application.WorksheetFunction.RoundUp((cost * follow_up), 0)

cost = 1
follow_up = 0.5

but x is coming out as 0 instead of 1

Thanks.