Return Column Name.

pizpower

New Member
Joined
May 15, 2024
Messages
12
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello,

I'd like to to automate few things, where I need to match the Main/Red ID's and get the Cab which will be in the 1st cell of each column, is this possible?

Settings Sheet Example:
Main ID'sRed ID'sCab 1Cab 2
1246​
1248​
1244​
761​
1242​
1244​
1242​
762​
558​
580​
600​
761​
762​
1328​
1329​
1140​
1141​
1236​
1238​

Sheet 2 Example:
Patch Details APatch Details BCabinet ID ACabinet ID B
ID1242 F67-68ID761 F1-2
ID1244 F59-60ID762 F1-2

In sheet 2 I'd like to return 2 results in a single cell, example:

Patch Details APatch Details BCabinet ID ACabinet ID B
ID1242 F67-68ID761 F1-2
Main,Cab 1​
Main,Cab 2​

or seperate

Patch Details APatch Details BCabinet ID AID ACabinet ID BID B
ID1242 F67-68ID761 F1-2
Cab 1​
Main
Cab 2​
Main

Thanks in advanced.
David
 
I removed the "ID" because you didn't show them in the OP. Try this.
Book1
ABCDEFGHI
1Table1
2Main ID'sRed ID'sCab 1Cab 2Patch Details APatch Details BCabinet ID ACabinet ID B
3124612481244761ID1242 F67-68ID761 F1-2Main ID's, Cab 1Main ID's, Cab 2
4124212441242762ID1244 F59-60ID762 F1-2Red ID's, Cab 1Red ID's, Cab 2
5558580600ID580 xyzID777 xyzRed ID's 
6761762ID1236 abcID600 abcMain ID'sCab 2
713281329
811401141
912361238
Sheet3
Cell Formulas
RangeFormula
H3:I6H3=TEXTJOIN(", ",,TOROW(IF(--TEXTAFTER(TEXTBEFORE(F3," "),"ID")=--$A$3:$D$9,$A$2:$D$2,""),,1))
Perfect :D

Thanks
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,221,904
Messages
6,162,743
Members
451,785
Latest member
DanielCorn

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