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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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?
 
Upvote 0
Thanks for trying everyone!! Unfortunately neither suggestions work. Any other suggestions??
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
oops didn't see your o8 was occupied, merge both the formula up would give you a clean original function.
 
Upvote 0
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"))
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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