Round up.. lower decimals

# Thread: Round up.. lower decimals

1. Junior Member
Join Date
Dec 1969
Posts
15

## Round up.. lower decimals

Can anyone tell me how to round up number.<BR><BR>I am doing a division calculation and whenever the result is . something it MUST round up.<BR><BR>ie I want 3.33 to be 4<BR><BR><BR><BR>not 3.33 to be 3<BR><BR><BR>the code below only rounds up when its .5 or over which is fair enough its just I don&#039;t want it to work that way<BR>divresult = 3.33<BR>FormatNumber(divresult, 0, -2, -2, -2)<BR>

2. Junior Member
Join Date
Dec 1969
Posts
15

## RE: Round up.. lower decimals

think i&#039;ve done it always +0.5 will that work?<BR><BR>&#039;take the total number of records in recordset<BR>VarTotalInRecordset = rsManuFact.RecordCount<BR>&#039;divide them by the number of records accross you need to display ie 2<BR>divresult = ((VarTotalInRecordset/3)+ 0.5)%&#062;<BR><BR>&#039;format divresult to always be rounded up to an integer.<BR>intNumRows = FormatNumber(divresult, 0, -2, -2, -2)<BR>

#### Posting Permissions

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