Combine Round with IF statement

gambils

Active Member
Joined
Apr 22, 2009
Messages
260
I have an if statement that is giving me a value, let's say 29, but I wanted it rounded to the nearest 5 - in this case, 30. How would I combine the round function with my if statement to give me that result?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Replace the A1 with your IF statement minus the = in your formula.

=ROUND(A1/5,0)*5
 
Upvote 0
I have no idea of your IF-statement but try something like:
Excel Workbook
AB
12930
Sheet
 
Upvote 0
I have initially used Hot Pepper's formula as it made a little more sense to me and it works! But I will try the others also- thanks to all! :)
 
Upvote 0
I have this formula to make ESI whose salary over 21000 they will be out of ESI and those who are below 21000 their ESI will be 1.75% of gross. Now i Need how i add roundup with this formula so that i can get amount like this 12000.00 not like this 12000.25

Please help me.

=IF(Q8>21000,Q8*0%,IF(Q8<=21000,Q8*1.75%,0))
 
Upvote 0
Q8 * 0% is 0, so this check isn't necessary. The only time you are doing any multiplication is if Q8<=21000.
So:

=ROUNDUP(IF(Q8<=21000,Q8*1.75%,0),0)

or without the IF:
=ROUNDUP(Q8*(Q8<=21000)*1.75%,0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top