View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default putting a string from one cell in the formula of another -- indirect needed?

What I'd like to do is reference a cell when pointing to the path of a
file. For example, I have a sheet like this:

TOTALA TOTALB
=c:\path1!sheet1!A1 =c:\path1!sheet1!B1
=c:\path2!sheet2!A1 =c:\path2!sheet2!B1
=c:\path3!sheet3!A1 =c:\path3!sheet3!B1


What I'd like:

TOTALA TOTALB FILE
=[c1]!A1 =[c1]!B1 c:\path1!sheet1
=[c2]!A1 =[c2]!B1 c:\path3!sheet2
=[c3]!A1 =[c3]!B1 c:\path3!sheet3


In these 2 columns. Ok, so it's a lot more than 2 columns, but you get
the idea. What I'd like to do is make the reference in cell A1 above
be a concatenation of the path name in column c and the cell number in
the targetted file as in the pseudoformula above.

Some places seemed to indicate that using the indirect() function would
make this work, but I just can't seem to get the syntax right. Maybe
because the other files aren't open???

Thanks