Search for first time text occurs, then display TEXTJOIN

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
304
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm trying to figure out how to write a formula that searches B9:AF9 for the first column that the code NS appears, then display a TEXTJOIN of the data in row 5 of that column, cell G1, and H1. I understand how to use LOOKUP, INDEX, and MATCH working with columns but not with rows. So if NS appears in D9, the results of the TEXTJOIN would be the data in D5,G1,H1. Can any one help?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Mr Excel Playground 3.xlsm
BCDEFGHIJKLMNOP
1ABCDESillyGooseHIJKLMNO
2131119101219201614121920181611
3121018111910181614161317161511
4131212101419111720171018121111
5161313151514121116131210101110
6151711121912131014201819162016
7182013111719171320151116101711
8151720161717121714101016131419
9abcdefNShijklNSg
10
11
1212SillyGoose
Sheet27
Cell Formulas
RangeFormula
D12D12=TEXTJOIN("",TRUE,INDEX(B5:AF5,1,XMATCH("NS",B9:AF9,0,1)),G1,H1)
 
Upvote 0
Solution
Mr Excel Playground 3.xlsm
BCDEFGHIJKLMNOP
1ABCDESillyGooseHIJKLMNO
2131119101219201614121920181611
3121018111910181614161317161511
4131212101419111720171018121111
5161313151514121116131210101110
6151711121912131014201819162016
7182013111719171320151116101711
8151720161717121714101016131419
9abcdefNShijklNSg
10
11
1212SillyGoose
Sheet27
Cell Formulas
RangeFormula
D12D12=TEXTJOIN("",TRUE,INDEX(B5:AF5,1,XMATCH("NS",B9:AF9,0,1)),G1,H1)
YOU are a ROCKSTAR! Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

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