COMBINING ROW DATA FROM 2 ROWS TO 1

JLouis

Active Member
Joined
Jan 1, 2004
Messages
295
Office Version
  1. 365
Platform
  1. Windows
I'm trying to combine names from 2 different rows into a single rown as shown on the sheet below. Maybe I'm approaching this wrong and would welcome a different solution or a modification to my formula. Thanks for looking this over.

"=IFERROR(INDEX($A$1:$F$1, COLUMNS(A5:$F$5)), IFERROR(INDEX($A$2:$F$2, COLUMNS(A5:$F$5)-COLUMNS($A$1:$F$1)),""))"


DK Single Game.xlsm
ABCDEFG
1JONESSMITH
2ANDREWSFORDDUFFYJOHNSON
3
4
50000SMITHJONES<- formula result
6
7JONESSMITHANDREWSFORDDUFFYJOHNSON<- what I would like it to be
TEAMS
Cell Formulas
RangeFormula
A5:F5A5=IFERROR(INDEX($A$1:$F$1, COLUMNS(A5:$F$5)), IFERROR(INDEX($A$2:$F$2, COLUMNS(A5:$F$5)-COLUMNS($A$1:$F$1)),""))
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
How about
Fluff.xlsm
ABCDEF
1JONESSMITH
2ANDREWSFORDDUFFYJOHNSON
3
4
5
6JONESSMITHANDREWSFORDDUFFYJOHNSON
7
Sheet5
Cell Formulas
RangeFormula
A6:F6A6=TOROW(A1:F2,1)
Dynamic array formulas.
 
Upvote 0
That is incredible! I've never seen "TOROW" nor knew it existed. How easy and clean. Awesome solution and rapid response. Thank you very much.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
I'm back. My apologies for not explaining fully. (Although I'm digging TOROW)

There are more names under the set of four. I need the first 2 names to be paired with the subsequent names going down the sheet.

JONESSMITH
ANDREWSFORDDUFFYJOHNSONTOJONESSMITHANDREWSFORDDUFFYJOHNSON
DALYABESTHOMASMASSEYTOJONESSMITHANDREWSFORDDUFFYJOHNSON
 
Upvote 0
How about
Fluff.xlsm
ABCDEFGHIJK
1JONESSMITH
2ANDREWSFORDDUFFYJOHNSONJONESSMITHANDREWSFORDDUFFYJOHNSON
3DALYABESTHOMASMASSEYJONESSMITHDALYABESTHOMASMASSEY
Sheet5
Cell Formulas
RangeFormula
F2:K3F2=HSTACK($A$1:$B$1,A2:D2)
Dynamic array formulas.
 
Upvote 0
Thanks again Fluff. Very cool. Worked great except there is a formula in C1 that may or may not have a name in it. HSTACK put a zero in that spot on the return. If I remove the formula, HSTACK works perfectly.

I saw that the TOROW function could skip blanks, does HSTACK any such function or could I modify the formula in C1 to provide a result that HSTACK would skip?

Or maybe, if I fill in the names (constants) with VBA so there is not formula involved perhaps?

What do you think?
 
Upvote 0
I'll make it work and understand my lack of clarity hampers your response. I appreciate your assistance greatly.
 
Upvote 0

Forum statistics

Threads
1,215,758
Messages
6,126,696
Members
449,331
Latest member
smckenzie2016

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