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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,941
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.
 

aacod

Well-known Member
Joined
Mar 20, 2009
Messages
667

ADVERTISEMENT

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.
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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),"")
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650

ADVERTISEMENT

Try

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

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I would expect #DIV/0! also:

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

aacod

Well-known Member
Joined
Mar 20, 2009
Messages
667
I tried all the formulas and they all work great.

Thanks everyone.:)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,891
Messages
5,834,263
Members
430,273
Latest member
Windrunner

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
Top