Forum Discussion
Combining ADDRESS with an INDEX MATCH formula, to find cell reference
Hi there,
I currently have an INDEX MATCH formula which is working across 2 spreadsheets and returning the value of the cell I want it to, but I want it to return the reference of the cell instead of the value it contains. I keep getting different errors when I try to use the address function.
I think I'm closer to using it correctly now, but I'm getting the "There's a problem with the formula. Not trying to type a formula?" error message.
This is my INDEX MATCH
=INDEX('[otherspreadsheet]May '!$E$11:$I$13,3,MATCH(C3,'[otherspreadsheet]May '!$E$11:$I$11,0))
This works and is currently returning 'E' which is what is in the cell it's found. I want it to return $G13 which is the address of the cell with an absolute column.
This is as far as I've got putting it in the address formula
=ADDRESS(3,INDEX('[otherspreadsheet]May '!$E$11:$I$13,3,MATCH(C3,'[otherspreadsheet]May '!$E$11:$I$11,0)),3,0,'[otherspreadsheet]May '!)
I'm using 3 as my row number because this is the row number I've used in the INDEX formula, so it's the row that cell I want returning is in, but I'm somewhat unsure on this.
I'm not sure what the error is or how to resolve it, or even if ADDRESS is the correct formula to be using at this point.
Many thanks for any help with this!
- TwifooSilver ContributorYou may construct your formula in the manner described in this link:
https://exceljet.net/formula/get-address-of-lookup-result- asd6231Copper Contributor
Hey, thank you, this worked in the end! I swear I'd tried using CELL "address" before, but it did finally work.
- TwifooSilver ContributorI’m delighted to learn that.
- AntsXLCopper Contributor
Hi,
I found this subject interesting. But I have a twist on it.
I'm trying to use ADDRESS()&":"&ADDRESS() in a Match formula to define the lookup range but it doesn't work.
When I hit F9 on the address part it shows the expected complete range correct but with quotation marks around it, that seems to be the issue. Why?
=MATCH(LEFT(B2;7);"'Sheet1'!"&ADDRESS(E7+1;3;1;1;)&":"&ADDRESS(E7+1;50;1;1;);0)
in the formula above using F9 to see result "'Sheet1'!R4C3:R4C50"
When put separately in a cell:
="'Sheet1'!"&ADDRESS(E7+1;3;1;1;)&":"&ADDRESS(E7+1;50;1;1;) // Result 'Sheet1'!R4C3:R4C50
If I paste the latter result in the formula it works.
Thanks!
- mtarlerSilver Contributor
AntsXL that is because you are putting TEXT in there instead of a cell reference. You need to add the INDIRECT() function to convert that TEXT into a cell reference. should be something like:
=MATCH(LEFT(B2;7);INDIRECT("'Sheet1'!"&ADDRESS(E7+1;3;1;1;)&":"&ADDRESS(E7+1;50;1;1;));0)