Solved

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

Posted on 2011-09-07
3
212 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
ID: 36498797
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
ID: 36498875
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
ID: 36499046
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

910 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

21 Experts available now in Live!

Get 1:1 Help Now