![]() |
round function in excel 2000
can whole numbers be "rounded" in excel, either with
the "round" function or thru vba? I have some calculations that I wish to display the results as follows: if results = o-24 then round down to 0 if results = 25-49 then round up to 50 |
One try ..
Assuming the numbers are integers in col A, in A1 down Put in B1: =IF(AND(A1=0,A1<=24),0,IF(AND(A1=25,A1<=49),50,A 1)) Copy down The above also assumes that any numbers *outside* the range: 0 - 49 are to be left intact (you didn't specify this) -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- "lots of questions" wrote in message ... can whole numbers be "rounded" in excel, either with the "round" function or thru vba? I have some calculations that I wish to display the results as follows: if results = o-24 then round down to 0 if results = 25-49 then round up to 50 |
On Thu, 3 Mar 2005 17:17:12 -0800, "lots of questions"
wrote: can whole numbers be "rounded" in excel, either with the "round" function or thru vba? I have some calculations that I wish to display the results as follows: if results = o-24 then round down to 0 if results = 25-49 then round up to 50 If I understand you correctly, you wish to round your number to the nearest 50. With your number in A1: =ROUND(A1/50,0)*50 or: =ROUND(your_formula/50,0)*50 --ron |
All times are GMT +1. The time now is 03:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com