ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup of identical values? (https://www.excelbanter.com/excel-worksheet-functions/96951-lookup-identical-values.html)

TobbeGardner

Lookup of identical values?
 

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


--
TobbeGardner
------------------------------------------------------------------------
TobbeGardner's Profile: http://www.excelforum.com/member.php...o&userid=35924
View this thread: http://www.excelforum.com/showthread...hreadid=557192


Roger Govier

Lookup of identical values?
 
Hi

Try
=VLOOKUP(LEFT(A1,3),text_table,2,0)&",
"&VLOOKUP(RIGHT(A1),action_table,2,0)

--
Regards

Roger Govier


"TobbeGardner"
wrote in
message
news:TobbeGardner.2a7biz_1151647915.8768@excelforu m-nospam.com...

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


--
TobbeGardner
------------------------------------------------------------------------
TobbeGardner's Profile:
http://www.excelforum.com/member.php...o&userid=35924
View this thread:
http://www.excelforum.com/showthread...hreadid=557192




TobbeGardner

Lookup of identical values?
 

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


--
TobbeGardner
------------------------------------------------------------------------
TobbeGardner's Profile: http://www.excelforum.com/member.php...o&userid=35924
View this thread: http://www.excelforum.com/showthread...hreadid=557192


Roger Govier

Lookup of identical values?
 
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"
wrote in
message
news:TobbeGardner.2adasp_1151926808.0582@excelforu m-nospam.com...

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


--
TobbeGardner
------------------------------------------------------------------------
TobbeGardner's Profile:
http://www.excelforum.com/member.php...o&userid=35924
View this thread:
http://www.excelforum.com/showthread...hreadid=557192





All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com