x
Solved

# How to use CountIf  with Indirect when referring to another worksheet?

Posted on 2011-09-06
Medium Priority
263 Views
Hello again,
See attached example.  I want to use INDIRECT to reference a cell that contains the worksheet name.  My formula works if I name the worksheet, e.g. data but not if I name it, e.g. 11-08-01.  Am I doing something wrong?  What would you suggest?

Gary
LCS-by-Activity-Code-08-2011-EE-.xls
0
Question by:garyrobbins
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 24

Accepted Solution

StephenJR earned 2000 total points
ID: 36491387
Does this work?

=COUNTIF(INDIRECT("'"&\$E\$4&"'!\$D\$5:\$AC\$100"),\$B6)

You need the quote marks I think.
0

Author Comment

ID: 36491424
StephenJR:
That did it!
Thanks for the prompt response.

Gary
0

Author Closing Comment

ID: 36491429
StephenJR:
That did it!
Thanks for the prompt response.

Gary
0

## Featured Post

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
###### Suggested Courses
Course of the Month15 days, 8 hours left to enroll