View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Danny Lewis Danny Lewis is offline
external usenet poster
 
Posts: 44
Default Indirect Reference

No worries, solved it with

=SUMPRODUCT((INDIRECT("'[Incidents
period"&RIGHT(AF$3,4)&".xls]DATA'!$G$8:$G$2000")=$C4)*(INDIRECT("'[Incidents
period"&RIGHT(AF$3,4)&".xls]DATA'!$W$8:$W$2000")=$AT$1))



"Danny Lewis" wrote:

Good morning all

I did in fact post a question about this yesterday afternoon but I didn't
really get the answers I needed and I wondered if anyone could help me out,
because it's drive me insane.

Along the top of a set of data run period numbers, eg. P0701, P0702, P0703
and so on.

Below that I have a formula which CURRENTLY looks like this under P0703:

=SUMPRODUCT(('[Incidents period0703.xls]DATA'!$G$8:$G$2000=$C4)*('[Incidents
period0703.xls]DATA'!$W$8:$W$2000="Mainline"))

It looks up data in a period's file, in this case, Incidents period0703.

How can I alter this formula so it reads from the column header the file
it's supposed to be reading from, rather than me changing it every period?

Many thanks in advance for you help,

Danny