Round Up

1. Senior Member
Join Date
Dec 1969
Posts
521

## Round Up

Hi<BR><BR>Is there a way to round up any number, so if the value was 1.1 it would round to 2 and not 1.<BR><BR>Thanks<BR><BR>Gary

2. Senior Member
Join Date
Dec 1969
Posts
261

## RE: Round Up

1.1 to 2 I don&#039;t know about that one but try.<BR><BR>number = 1.1<BR>number = number + 1<BR>number = formatnumber(number, 0)

3. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## Not directly.

But a simple function does it for you:<BR>Function RoundUp(ByVal NumberToRound)<BR>Dim TestNumber<BR> TestNumber = Int(NumberToRound)<BR> If TestNumber &#060;&#062; NumberToRound Then<BR> TestNumber = TestNumber + 1<BR> End If<BR> RoundUp = TestNumber<BR>End Function<BR><BR>I think that should work.

4. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## What if number = 1? (eop)

.

5. Senior Member
Join Date
Dec 1969
Posts
261

## RE: What if number = 1? (eop)

That&#039;s why they call you God. Sorry man.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•