Search for first time text occurs, then display TEXTJOIN

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
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,224,039
Messages
6,176,014
Members
452,697
Latest member
CuriousSpreadsheet

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