round function in excel 2000

  • Thread starter lots of questions
  • Start date
L

lots of questions

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
 
M

Max

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,A1))
Copy down

The above also assumes that any numbers *outside* the range: 0 - 49
are to be left intact (you didn't specify this)
 
R

Ron Rosenfeld

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top