Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Help about RoundUp Function

  Asked By: Geeske    Date: Mar 25    Category: MS Office    Views: 889
  

I want to ask a question about usage of RoundUp function,
In a vba application, I need to use RoundUp ( or Ceil) function, even if I used
round function before billions of time, I've never used round up function
before. So I'm trying to use below example codes but they are not working;

Range("B2").Value = RoundUp((Range("A1").Value / Range("A2").Value), 0)
-----

Below example codes are workings;

Range("B2").Value = Round((Range("A1").Value / Range("A2").Value), 0)
or
Range("B2").FormulaR1C1 = "=ROUNDUP(R[-1]C[-1]/RC[-1],0)"

so how may I use roundup function with variables such as (Range("A1").Value

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Flynn Jones     Answered On: Mar 25

RoundUp is not a VBA function  but an Excel worksheet function. You need to
use:

Application.WorksheetFunction.RoundUp

 
Didn't find what you were looking for? Find more on Help about RoundUp Function Or get search suggestion and latest updates.




Tagged: