SOLVED

help determining proper function to use

Copper Contributor

I need help determining the proper function if one exists.

 

I am comparing 2 different cells to determine a number to place in another cell.

The basis is: 

IF c2="NIL" and d2="ASCUS" then "1/2" should be in e2  OR

IF c2="NIL" and d2="LSIL" then "1" should be in e2  OR 

IF c2="NIL" and d2="HSIL" then "2" should be in e2. 

 

There are multiple other comparison I want to make also. So maybe 6 different comparisons in e2. 

 

Thanks. 

3 Replies

@LUKEHARWELL22 

I'd create a small lookup table. In the screenshot below, it is in H2:I7.

The formula in E2 is

=IF(C2="NIL",VLOOKUP(D2,$H$2:$I$7,2,FALSE),"")

S0822.png

Hey thanks for that. That will probably be my best bet going forward. Now to add other scenarios. with c2.

if c2=ascus and d2=nil then e2="1/2 or
if c2=lsil and d2=nil then e2=1 or
c2=hsil and d2=ascus then e2=2.

How can I do vlookup with c2 being multiple different things?
thanks.
best response confirmed by LUKEHARWELL22 (Copper Contributor)
Solution

@LUKEHARWELL22 

I'd use a two-dimensional lookup table:

S0823.png

See the attached sample workbook.

1 best response

Accepted Solutions
best response confirmed by LUKEHARWELL22 (Copper Contributor)
Solution

@LUKEHARWELL22 

I'd use a two-dimensional lookup table:

S0823.png

See the attached sample workbook.

View solution in original post