zephan.trent
New Member
- Joined
- Dec 17, 2008
- Messages
- 3
I want to locate the cell that a lookup function (VLOOKUP, HLOOKUP, or INDEX) gets its value from.
For example:
if Cell A2 = "lookup_ref"
then VLOOKUP("lookup_ref",A1:D4,3,False) should return the value of cell C2.
I need to be able to find out what the source cell (i.e. C2 in this case is) is for the lookup functions. I want to do this in VBA.
Using excels find precedents doesn't work for this as it returns the ranges rather than the actual cell address that is looked up.
Does anyone know how I can do this?
Thanks very much.
Zeph
For example:
if Cell A2 = "lookup_ref"
then VLOOKUP("lookup_ref",A1:D4,3,False) should return the value of cell C2.
I need to be able to find out what the source cell (i.e. C2 in this case is) is for the lookup functions. I want to do this in VBA.
Using excels find precedents doesn't work for this as it returns the ranges rather than the actual cell address that is looked up.
Does anyone know how I can do this?
Thanks very much.
Zeph