View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Need to reference two cells to construct formula

=DCOUNT(INDIRECT("'" & A1 &"'!" & A2........etc



Gord Dibben MS Excel MVP

On Sat, 13 Jun 2009 17:09:25 -0700 (PDT), DaisyGirl wrote:

Hi

I don't think this is a hard problem but I'm definitely struggling
with it.

This formula currently works:

=DCOUNT('CD-09-147968'!A1:M10, "Date received", Query!C5:D6)


I would like to reference the name of the sheet (CD-09-147968) by
getting the information from another cell. Let's say that this
information will be stored in cell A1.

I also want to put the A1:M10 range in another cell and reference that
as well. Let's say this information will be stored in A2.

Does anyone know how to refer to cells A1 and A2 in the DCount formula
so that it gets the spreadsheet name and cell range?

Thanks for any help you can give....

regards
Helen