View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Graham Graham is offline
external usenet poster
 
Posts: 155
Default Named Range reference via single Cell

Hi I am trying to create a generic report that anyone can generate just by
typing column title and criteria.
I am using a setup worksheet to enter information.
I can use the criteria as a reference, If I type the criteria say "Not
Started" in cell B4 of the setup worksheet i can use
=COUNTIF(Overall_Status,B4) returning the correct answer 112,
But If I try to use a cell reference for both the column title and the named
range e.g. Column title Overall_Status in cell B6 and criteria in cell B4 as
before, then =COUNTIF(B6,B4) or =COUNTIF(INDIRECT(B6),B4) return zero or REF#
error.
Is there a way this can be done ?
Thanks in advance
Graham