RoundUp Sub/Routine not defined

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use the Roundup worksheet function in a VBA formula and I'm
getting a "Compile Error: Sub or Function not defined". I thought I should
be able to use this function in VBA. Any help would be greatly appreciated.
Thanks!
 
This works for me:

Dim dResult As Double
dResult = Application.WorksheetFunction.RoundUp(Range("A1").Value, 2)
 
demo'd from the immediate window:

? application.Roundup(123.456,1)
123.5

works for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top