How do I extract the first and last values in a column?

Andries

Board Regular
Joined
Feb 3, 2011
Messages
127
Hi All


How do I extract the first and last values in Column DD based the subject code in Column CY?
It must look like this for example:
AAD101C "RED-ROW 1-SEAT 1" "to" "RED-ROW 2-SEAT 10"
HAT321T "RED-ROW 2-SEAT 17" "to" "RED-ROW 3-SEAT 4"

Excel Workbook
CYCZDADBDCDD
2Subject codeINVIGILATORBLOCKROW NUMSEAT NUMBLOCK/ROW/SEAT
3AAD101CERASMUS, RASSIERED11RED-1-1
4AAD101CERASMUS, RASSIERED12RED-1-2
5AAD101CERASMUS, RASSIERED13RED-1-3
6AAD101CERASMUS, RASSIERED27RED-2-7
7AAD101CERASMUS, RASSIERED28RED-2-8
8AAD101CERASMUS, RASSIERED29RED-2-9
9AAD101CERASMUS, RASSIERED210RED-2-10
10HAT321TERASMUS, RASSIERED217RED-2-17
11HAT321TERASMUS, RASSIERED218RED-2-18
12HAT321TERASMUS, RASSIERED219RED-2-19
13HAT321TERASMUS, RASSIERED31RED-3-1
14HAT321TERASMUS, RASSIERED32RED-3-2
15HAT321TERASMUS, RASSIERED33RED-3-3
16HAT321TERASMUS, RASSIERED34RED-3-4
30X (2)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Perhaps

=INDEX(DD:DD,MATCH("AAD101C",CY:CY,0))
& " to " &
INDEX(DD:DD, MATCH("AAD101C",CY:CY, 1))

... after changing the formula in D2 and down to

=DA3 & "-ROW " & DB3 & "-SEAT " & DC3
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top