Excel - IF?

Copper Contributor

Hi, does anybody know which function in excel is right to do - see below:

 

If in the column A1 is a Company City (there are more of them according to cities, i.e. company London, company Prague, company Berlin, etc.) and B1 is Gasoline 100, it will be written BA95 PLUS in other table (Converter kind of table) and if in A1 is any other customer (as in the table Customer AAA) and B1 Gasoline 100 it will be BA95 ULTRA in that other Converter table. There are more products so as example there is Gasoline 95 but there is no change according to Customer.

 

             A                           B                                                       A                         B

1  Company City        Gasoline 100                                1  Company City     BA95 PLUS

2  Company City        Gasoline  95                                 2  Company City     BA95

3  Customer AAA       Gasoline 100                                3  Customer AAA    BA95 ULTRA

4  Customer AAA       Gasoline  95                                 4  Customer AAA    BA95

 

I know how to do it with one condition but with two conditions i do not know which function to use. 

Example with one condition when it changes just to ULTRA and not PLUS:

IF(List1!D2="Gasoline 95";"BA95";IF(List1!D2="Gasoline 100";"BA95 ULTRA";""))

2 Replies

@mladywoody 

=INDEX($J$2:$K$7,MATCH(B1,$I$2:$I$7,0),MATCH(A1,$J$1:$K$1,0))

I'd create a lookup table as shown in the screenshot in columns I to K.

lookup.png 

@OliverScheurich

Thank you, i did it with with using IF with LEFT and VLOOKUP and two databases of products. :grinning_face_with_sweat: