B1:
=LOOKUP(A1,{"ABC","CDF","DFE"},{3,5,2.6})
The formula uses a 2-column built-in table, sorted in ascending order on
its first column, which associates strings with numerical values.
Note that A1 must not have a string that does not occur in the
(built-in) table.
Note also that you can have the table in some range, name it Table, and use:
=LOOKUP(A1,Table)
Christopher Anderson wrote:
How would a lookup statement work in this situation. If I have a column that
has various text strings in it (ex. ABC, CDF, DFE, FEG...) and I want to
assign a numeric value in a separate column to all ABC's, CDF's, DFE's, etc.
I tried this with a nested if statement but it would not allow me to do more
than 8 nested if statements. I tried a lookup function but I am not familiar
enough with these to know if what I did was correct. What would you suggest?
Perhaps give me an example of the syntax.
Thanks
Christopher
"Christopher Anderson" wrote:
How many "if" statements can I include into each formula? I can only seem to
get about 9 and then it gives me an error message. Is there a better way to
do conditional statements that have several conditions?
Thanks
Christopher
|