georgewashington
Technical User
Hello,
I have a question on referring to ranges in an Excel “lookup” formula. How do I get lookup to look to a cell outside the formula cell for a range name.
Background: The horizontal look up table typically works like this: hlookup(what to look up, where to look up, how many rows to go down).
As an example, you can tell a "lookup" formula to look for value 10 in range "infolocation" and then go 100 rows down to grab a value. you can do this like so: =hlookup(10,infolocation,100). This works if “infolocation” is a current range name in the spreadsheet.
Or you can tell the formula to look for value 10 in range D5:J15 and go 100 rows down to grab a value. Like so: =hlookup(10,D5:J15,100) works if because D5:J15 is a valid what to tell a look up formula.
But if you wanted to tell the lookup formula to go to cell, say B4, to get the range name (rather than cell B4 being the range) it would look like this: =hlookup(10,B4,100). (Assuming one types “infolocation” into cell B4.) But it does not work. Excel thinks cell B4 is the range to look in - not the cell that cantains a range name.
How do I get a lookup formula to grad a range name outside the formula per se?
Thanks for any help - this is really bugging me,
georgewashington
I have a question on referring to ranges in an Excel “lookup” formula. How do I get lookup to look to a cell outside the formula cell for a range name.
Background: The horizontal look up table typically works like this: hlookup(what to look up, where to look up, how many rows to go down).
As an example, you can tell a "lookup" formula to look for value 10 in range "infolocation" and then go 100 rows down to grab a value. you can do this like so: =hlookup(10,infolocation,100). This works if “infolocation” is a current range name in the spreadsheet.
Or you can tell the formula to look for value 10 in range D5:J15 and go 100 rows down to grab a value. Like so: =hlookup(10,D5:J15,100) works if because D5:J15 is a valid what to tell a look up formula.
But if you wanted to tell the lookup formula to go to cell, say B4, to get the range name (rather than cell B4 being the range) it would look like this: =hlookup(10,B4,100). (Assuming one types “infolocation” into cell B4.) But it does not work. Excel thinks cell B4 is the range to look in - not the cell that cantains a range name.
How do I get a lookup formula to grad a range name outside the formula per se?
Thanks for any help - this is really bugging me,
georgewashington