W
Walter Mayes
Yesterday I asked how to retrieve the last value in a dynamic column of
values. Aladin Akyurek gave the following formula which does exactly as I
requested:
=LOOKUP(9.9999e+307,G:G)
I had not considered the LOOKUP function as it has been my understanding
that the LOOKUP functions will look for a value "match" and if none is found
it will scan the list until it finds a value greater then the requested
value then return the value in the previous cell.
EXAMPLE: If I have numbers from 16000 to 18000 and I ask LOOKUP to
retrieve 17000, it would retrieve the 17000 if this number appears in the
list. But if 17000 does not appear in the list, LOOKUP will scan down my
list until it sees the first value above 17000 (17100) and then return the
value that appears in the cell above the 17100 value. (possibly 16941)
Why does the "BIG NUMBER" in Aladins formula cause the LOOKUP function
to go to the last value entered? I'm thinking all values in my list are less
than the requested value (BIG NUMBER) and the "next" cell after my last
entry is "empty" (therefore "nothing"). So what is the logic that causes
LOOKUP to retrieve the last entry as opposed to any other entry?
I have tried the VLOOKUP function following Aladins suggestion and it
also retrieves the last entry.
Microsoft HELP states at one point, "With HLOOKUP and VLOOKUP, you can
index down or across, but LOOKUP always selects the last value in the row or
column." This is confusing to me.
Hope I have explained my question clearly.
Walter Mayes
values. Aladin Akyurek gave the following formula which does exactly as I
requested:
=LOOKUP(9.9999e+307,G:G)
I had not considered the LOOKUP function as it has been my understanding
that the LOOKUP functions will look for a value "match" and if none is found
it will scan the list until it finds a value greater then the requested
value then return the value in the previous cell.
EXAMPLE: If I have numbers from 16000 to 18000 and I ask LOOKUP to
retrieve 17000, it would retrieve the 17000 if this number appears in the
list. But if 17000 does not appear in the list, LOOKUP will scan down my
list until it sees the first value above 17000 (17100) and then return the
value that appears in the cell above the 17100 value. (possibly 16941)
Why does the "BIG NUMBER" in Aladins formula cause the LOOKUP function
to go to the last value entered? I'm thinking all values in my list are less
than the requested value (BIG NUMBER) and the "next" cell after my last
entry is "empty" (therefore "nothing"). So what is the logic that causes
LOOKUP to retrieve the last entry as opposed to any other entry?
I have tried the VLOOKUP function following Aladins suggestion and it
also retrieves the last entry.
Microsoft HELP states at one point, "With HLOOKUP and VLOOKUP, you can
index down or across, but LOOKUP always selects the last value in the row or
column." This is confusing to me.
Hope I have explained my question clearly.
Walter Mayes