Rounding off Excel formula

aacod

Well-known Member
Joined
Mar 20, 2009
Messages
667
Value in cell B4 is 22

Value in cell G7 is 267

I want a formula for 100-(B4/G7*100) ROUNDED OF TO NEAREST WHOLE FIGURE.

Actual value comes to 91.7603 which needs to be rounded off to 92


thanks in advance.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Not sure where you want it to be rounded before you subtract it from 100 or after the subtraction, but you can do something like:

=round(100-(B4/G7*100),0)

or:

=100-round(B4/G7*100,0)

Hope that helps.
 
Upvote 0
When there are no figures in B4 and G7, it puts ?NAME, I want it to remain BLANK, when there are no values in the cells. Thanks.
 
Upvote 0
You shouldn't get #NAME? error, I'd expect #DIV/0! but in any case try

=IF(COUNT(B4,G7)=2,ROUND(100-B4/G7*100,0),"")
 
Upvote 0
I would expect #DIV/0! also:

=IF(G7,ROUND(100-(B4/G7*100),0),"")
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,533
Members
448,969
Latest member
mirek8991

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