Solved

How do I modify my Count IF formula to return BLANK when referenced worksheet is missing?

Posted on 2011-09-07
3
201 Views
Last Modified: 2012-05-12
Ok, This formula did the job nicely (see attached).
[=COUNTIF(INDIRECT("'"&E$4&"'!$D$5:$AC$100"),$B6)

I now want to modify this formula to return a BLANK (or "") when referenced wksht is missing, instead of #REF!.

Any suggestions?

Gary
LCS-by-Activity-Code-08-2011-EE-.xls
0
Comment
Question by:garyrobbins
3 Comments
 
LVL 6

Accepted Solution

by:
reitzen earned 450 total points
Comment Utility
Wrap it in another IF statement

=IF(ISERROR(your formula here),"",your formula here)
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 50 total points
Comment Utility
To avoid repeating the whole formula you can just check whether referring to A1 on that sheet using INDIRECT gives an error, e.g.

=IF(ISERR(INDIRECT("'"&E$4&"'!A1")),"",COUNTIF(INDIRECT("'"&E$4&"'!D5:AC100"),$B6))

regards, barry
0
 

Author Closing Comment

by:garyrobbins
Comment Utility
reitzen: Awesome.  I have not yet used the ISERROR function and I now see how simple it is.

Barry, thanks for describing yet another way of addressing the issue -- that may be good for a future application where my formula is long and complicated.

I've split the points - hope you find this fair.

Thanks, again for the prompt response.  You make my job easier knowing you experts are there to help.
Gary
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now