Terry wrote:
I am just so weak; I could not let this go. I used =NA() to get #NA and
replicated the formula as follows (spaces inserted):
=IF(ISNA(VLOOKUP("calendar";MyLookup;2;0));
IF(ISNA(VLOOKUP("google";MyLookup;2;0));"";
VLOOKUP("calendar";MyLookup;2;0);VLOOKUP("google";MyLookup;2;0))
The result I get is ERR:504.
Try
=IF(ISNA(VLOOKUP("calendar";MyLookup;2;0));
IF(ISNA(VLOOKUP("google";MyLookup;2;0));"";
VLOOKUP("google";MyLookup;2;0));VLOOKUP("calendar";MyLookup;2;0))
without the spaces.
If you don't find calendar, look for google. If you did find calendar,
skip to the end and do the last vlookup.
If you didn't find google, return "". If you did find google, return the
match.
Put another way,
Our initial if statement is
IF(ISNA(VLOOKUP("calendar";MyLookup;2;0))
when true, run this: IF(ISNA(VLOOKUP("google";MyLookup;2;0));"";
VLOOKUP("google";MyLookup;2;0))
when false, run this: VLOOKUP("calendar";MyLookup;2;0)
Other comments:
> VLOOKUP returns whatever is in the cell looked up. If it's necessary
> to convert text to a number, James could use VALUE(VLOOKUP(...))
We don't want to convert the answer to the VLOOKUP. We would want to
convert what we are looking for to a number.
> I don't even know how to get #NA from VLOOKUP.
That would happen if the data you are looking for, google, in your
example, is not in the data set. That is, #N/A is what VLOOKUP returns
when it doesn't find what you are trying to look up.
WalterAM
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]