How do I get a cell value based on different criteria?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple template that I am trying to set up to do an analysis on our
profit for a line of business. In column A11 am using a Code (BL, EP, PB
etc) that will affect the value of the cell in column G12. Ths value is not
the same for each of the codes in A11. What "simple" formula can I use to
accomplish this. I am guessing I will need a type of validation or lookup
but don't know the proper procedures. Thanks

BG
--
 
VLOOKUP

In Columns A & B of say Sheet2 have your codes and their corresponding values

in G12:

=VLOOKUP(A11,Sheet2!A:B,2,false)

To allow for A11 value not present in table:

=IF(ISNA(VLOOKUP(A11,Sheet2!A:B,2,false)),"Invalid
code",VLOOKUP(A11,Sheet2!A:B,2,false))

<A11> could use Data Validation to ensure a valid list based on the codes in
your lookup table on Sheet2 and hence remove need for error check.

HTH
 
Back
Top