IF Formula

vingo

New Member
Joined
Jan 17, 2005
Messages
15
Here it is...

G11 corresponds to the sheet I want the cells to pull info off of...
M8 =INDIRECT(G11& "!BD23")
N8 =INDIRECT(G11& "!BD52")
O8 (oh8) =IF(ISERROR(N8+M8), "0", N8+M8)


If M8 = 5, N8 = 3, then O8 = 8
The problem is if either M8 or N8 is blank because the referenced cell is blank, O8 remains 0. Any may to make M8 and N8 show 0 if the referenced cell is blank or make O8 automatically calculate a blank in M8 or N8 as 0? This is complicated..All help would be appreciated.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Barrie Davidson

MrExcel MVP
Joined
Feb 10, 2002
Messages
2,330
What about trying:

M8 =IF(INDIRECT(G11& "!BD23")="",0,INDIRECT(G11& "!BD23"))
N8 =IF(INDIRECT(G11& "!BD52") ="",0,INDIRECT(G11& "!BD52"))

Would that work for you?
 

vingo

New Member
Joined
Jan 17, 2005
Messages
15
Thanks for trying everyone!! Unfortunately neither suggestions work. Any other suggestions??
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows

ADVERTISEMENT

What exactly is not working? And what is generating the error you are trying to trap? Also, you should remove your quotes around the zero in your 08 formula.
 

dr_shivan

Active Member
Joined
Jan 3, 2005
Messages
298
you can try the below

08=IF(ISERR(M8),0,M8)

or you can merge the above with M8 replacing M8 with your code.
This was, both M8 and N8 will give either a 0 or the result. no more #REF

Hope the above solve your problem
 

dr_shivan

Active Member
Joined
Jan 3, 2005
Messages
298

ADVERTISEMENT

oops didn't see your o8 was occupied, merge both the formula up would give you a clean original function.
 

vingo

New Member
Joined
Jan 17, 2005
Messages
15
I finally figured it out on my own!!! Here is what I got...what do you guys think??

M8 =IF(INDIRECT(G11 & "!BD23")="","0",INDIRECT(G11 & "!BD23"))
N8 =IF(INDIRECT(G11 & "!BD52")="","0",INDIRECT(G11 & "!BD52"))
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
vingo said:
I finally figured it out on my own!!! Here is what I got...what do you guys think??

M8 =IF(INDIRECT(G11 & "!BD23")="","0",INDIRECT(G11 & "!BD23"))
N8 =IF(INDIRECT(G11 & "!BD52")="","0",INDIRECT(G11 & "!BD52"))

A 0, which is a number, should not be put between double quotes. If the target cell is empty, you'll get automatically a 0, so there is no reason why you'd call INDIRECT twice. Doesn't

=INDIRECT("'"&G11&"'!BD23")

suffice? You can custom format the formula cell as:

[=0]"";General

if you want to.
 

Forum statistics

Threads
1,148,524
Messages
5,747,183
Members
424,068
Latest member
Salim khamis

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