Hello. I have the following formula ="["&INDIRECT("AA12")&".xls]Sheet1!C15" and it's intended to return that value in C15 in a different workbook. However, all it's doing is writing the text in the cell. How can I fix this?
Hello. I have the following formula ="["&INDIRECT("AA12")&".xls]Sheet1!C15" and it's intended to return that value in C15 in a different workbook. However, all it's doing is writing the text in the cell. How can I fix this?
Remove the "" around AA12
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Now it gives me a ref error. The value that I have in AA12 is 41655 (date).![]()
eveything meets to be in the indirect this works
=INDIRECT("["&AA12&"]Sheet1!C15")
what is the name of the workbook?
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Oh nice, @martindwilson. Your formula worked. Can you explain what it is doing and why Fdibbins formula didn't work? Also, can I subtract 1 from the number within the indirect? So it will reference 41655 but return 41644? Thanks.
Last edited by ammartino44; 02-21-2014 at 05:51 PM.
you need to build the whole reference inside the indirect
i tried it this way and it also works
=INDIRECT("'["&AA12&".xlsx]Sheet1'!C15")
if you try
="c"&a1 where a1= 5 and c5=100 you get text of "c5"
if you wrap it in indirect
=INDIRECT("c"&A1) you get what is in c5 ie 100
this is what i see
Last edited by martindwilson; 02-21-2014 at 05:56 PM.
When I use xls it works, but not when I use your xlsx. Why is that?
probably because the file i'm looking at is a .xlsx?
If your file is .xlsx, then it will not be able to find .xls
Makes sense haha. Last question: If I wanted to use the indirect above but use this formula instead of the C15 reference, how could I do that? OFFSET($A$8,MATCH("COMPANY TOTAL",$A$8:$A$851,0)-1,4)
Maybe I'll start a new thread.
why are you using offset?
=INDEX($E$8:$E$851,MATCH("company total",$A$8:$A$851,0)) is more practical
I'm using offset because there are multiple instances of particular lookups. I could be wrong though. Why are you using E? I need to combine the indirect formula above with the lookup formula I created (or a better one) so that it does the lookup on that particular workbook.
because that is where the offset is looking 4 columns away from column A ie column E
Ok. So, how would you combine that formula with the indirect formula that you gave me above?
done in other thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks