how can I round a number to the nearest 100?

# Thread: how can I round a number to the nearest 100?

1. Member
Join Date
Dec 1969
Posts
86

## how can I round a number to the nearest 100?

e.g.<BR><BR>5678 = 5700<BR><BR>65 = 100<BR><BR>33333 = 33300

2. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## RTFFAQs

FAQ# 87<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
1,032

## RE: how can I round a number to the nearest 100?

try something like,<BR><BR>fix((Mynumvar /100))*100<BR><BR>jon.

4. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## huh

what will that do??<BR><BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
1,032

## RE: huh

&nbsp;<BR>5678 / 100 = 56.78<BR><BR>fix(56.78) = 57<BR><BR>57*100<BR><BR>5700<BR><BR>Nearest Hundered !!<BR><BR>23 / 100 = 0.23<BR><BR>fix(0.23) = 0<BR>0 * 100 =0<BR>Nearest Hundered !!<BR><BR>I think ????????<BR><BR><BR>jon.

6. Senior Member
Join Date
Dec 1969
Posts
11,247

## RE: huh

No he wanted round <BR>fix would for 65 give 0 not 100

7. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## nope

first of all you have a few extra ()<BR><BR><BR>secondly<BR><BR>why will fix of 56.78 give you 57?? it would give you 56 actually<BR><BR>AND fix of 23/100 will give you 0<BR><BR>

8. Senior Member
Join Date
Dec 1969
Posts
1,032

## oops , round not fix U R right WK !!!!

sorry, long day !!!!<BR><BR><BR>jon..

9. Senior Member
Join Date
Dec 1969
Posts
96,118

## Ummmm....Ak....

...AND fix of 23/100 will give you 0<BR><BR><BR>Well, yes, but so will <BR> Round( 23/100 )<BR><BR>And 23 rounded to the nearest 100 *is* zero.<BR><BR>You picked a poor example.<BR><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
•