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.
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

schielrn

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

Watch MrExcel Video

Forum statistics

Threads
1,122,223
Messages
5,594,908
Members
413,952
Latest member
JGer

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