Lookup of identical values?

T

TobbeGardner

Hi,

I have an worksheet with data like:
123, 1
124, 1
124, 2
125, 1
125, 2

In another worksheet, the alarm codes above are translated:
123 = "Alarm text 1"
124 = "Alarm text 2"
125 = "Alarm text 3"

And in the third worksheet, the action is translated:
1 = raise
2 = cease

What I would like is the possiblity to convert the three worksheets
into:
Alarmtext, raise?, cease?
"Alarm text 1", yes, no
"Alarm text 2", yes, yes
"Alarm text 3", yes, yes

Using only vlookup, I only get the first value in the first table, i.e.
I need a way to find the second (or third) value in column two with the
same id as in column one.

Thanks in advance!

Regards,
Tobbe G
 
T

TobbeGardner

Hi,

I am sorry, I was not clear enought...
123 is in one column A and 1 or 2 is in column B.

Your solution, if I understand it, works fine if I was looking for
"123,1" in a single cell.

Is there away to solve the problem with the data in different columns?

Regards,
Tobbe G
 
R

Roger Govier

Hi
I can't see how to do it in one pass, but if you used helper columns.
In C1
=VLOOKUP(A1,table_text,2,0)
in D1
=CHOOSE(B1,"raise","cease")
in E2
=IF(C2=C3,"",C2&","&D1&","&D2)
Copy the formulae down as far as required


--
Regards

Roger Govier


"TobbeGardner"
message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top