formula to join text in multiple rows at each date.

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello experts
I have 2019 verion of excel. I am trying to join the text in column D which is spread in 2 or more rows in the row of each date. I have inserted a help column E and I used “&” function but it works only when the text in column D has 2 rows only.If I use this formula =IF(C1="","",D1&” “&D2), the rows containing text in 3 or more rows is not copied. The sheet has more than 800 different dates. So, it will be tedious to change the formula at every 3 or 4 rows. Need help with a formula to join the text if the rows vary.
Join text different rows.xlsx
ABCDE
117-08-2021aaz/116820829672/a2V/yzavzaaz/116820829672/a2V/yzavzzzzyz555@ayazz/yzyazazzz
2zzzyz555@ayazz/yzyazazzz 
317-08-2021aaz/116820329131/a2V/azzyzaaz/116820329131/a2V/azzyzaw16889-
4aw16889- 
51@ayzxza/azzyzaW 
617-08-2021yzza_zy:yyzyz2116881584yzza_zy:yyzyz21168815843/0031/ yzazaz zyazazaa
73/0031/ yzazaz zyazazaa 
816-08-2021yzza_aaa:aayzz21167213yzza_aaa:aayzz21167213021/azyzy
9021/azyzy 
10zyyavzazaya/yyzy0001435/04 
1113090674 
1216-08-2021zyaa-zyaa-zy/116713428622/924626717
13zy/116713428622/924626717 
141/yzazzazy 
Bank
Cell Formulas
RangeFormula
E1:E14E1=IF(C1="","",D1&D2)
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This should work if you have at most 10 rows to concatenate:

Book1
ABCDE
18/17/2021aaz/116820829672/a2V/yzavzaaz/116820829672/a2V/yzavzzzzyz555@ayazz/yzyazazzz
2zzzyz555@ayazz/yzyazazzz 
38/17/2021aaz/116820329131/a2V/azzyzaaz/116820329131/a2V/azzyzaw16889-1@ayzxza/azzyzaW
4aw16889- 
51@ayzxza/azzyzaW 
68/17/2021yzza_zy:yyzyz2116881584yzza_zy:yyzyz21168815843/0031/ yzazaz zyazazaa
73/0031/ yzazaz zyazazaa 
88/16/2021yzza_aaa:aayzz21167213yzza_aaa:aayzz21167213021/azyzyzyyavzazaya/yyzy0001435/0413090674
9021/azyzy 
10zyyavzazaya/yyzy0001435/04 
1113090674 
128/16/2021zyaa-zyaa-zy/116713428622/9246267171/yzazzazy
13zy/116713428622/924626717 
141/yzazzazy 
15
Sheet12
Cell Formulas
RangeFormula
E1:E14E1=IF(C1="","",CONCAT(D1:INDEX(D:D,IFERROR(AGGREGATE(15,6,ROW(C1:C9)/(C2:C10<>""),1),ROW()+10))))
 
Upvote 0
Solution
Upvote 0
This should work if you have at most 10 rows to concatenate:

Book1
ABCDE
18/17/2021aaz/116820829672/a2V/yzavzaaz/116820829672/a2V/yzavzzzzyz555@ayazz/yzyazazzz
2zzzyz555@ayazz/yzyazazzz 
38/17/2021aaz/116820329131/a2V/azzyzaaz/116820329131/a2V/azzyzaw16889-1@ayzxza/azzyzaW
4aw16889- 
51@ayzxza/azzyzaW 
68/17/2021yzza_zy:yyzyz2116881584yzza_zy:yyzyz21168815843/0031/ yzazaz zyazazaa
73/0031/ yzazaz zyazazaa 
88/16/2021yzza_aaa:aayzz21167213yzza_aaa:aayzz21167213021/azyzyzyyavzazaya/yyzy0001435/0413090674
9021/azyzy 
10zyyavzazaya/yyzy0001435/04 
1113090674 
128/16/2021zyaa-zyaa-zy/116713428622/9246267171/yzazzazy
13zy/116713428622/924626717 
141/yzazzazy 
15
Sheet12
Cell Formulas
RangeFormula
E1:E14E1=IF(C1="","",CONCAT(D1:INDEX(D:D,IFERROR(AGGREGATE(15,6,ROW(C1:C9)/(C2:C10<>""),1),ROW()+10))))
This should work if you have at most 10 rows to concatenate:

Book1
ABCDE
18/17/2021aaz/116820829672/a2V/yzavzaaz/116820829672/a2V/yzavzzzzyz555@ayazz/yzyazazzz
2zzzyz555@ayazz/yzyazazzz 
38/17/2021aaz/116820329131/a2V/azzyzaaz/116820329131/a2V/azzyzaw16889-1@ayzxza/azzyzaW
4aw16889- 
51@ayzxza/azzyzaW 
68/17/2021yzza_zy:yyzyz2116881584yzza_zy:yyzyz21168815843/0031/ yzazaz zyazazaa
73/0031/ yzazaz zyazazaa 
88/16/2021yzza_aaa:aayzz21167213yzza_aaa:aayzz21167213021/azyzyzyyavzazaya/yyzy0001435/0413090674
9021/azyzy 
10zyyavzazaya/yyzy0001435/04 
1113090674 
128/16/2021zyaa-zyaa-zy/116713428622/9246267171/yzazzazy
13zy/116713428622/924626717 
141/yzazzazy 
15
Sheet12
Cell Formulas
RangeFormula
E1:E14E1=IF(C1="","",CONCAT(D1:INDEX(D:D,IFERROR(AGGREGATE(15,6,ROW(C1:C9)/(C2:C10<>""),1),ROW()+10))))
Ii worked perfectly. Now I have to just change the range to 1000 and check. Thanks Eric W.?
 
Upvote 0
You really don't need to change the range unless you expect to have more than 10 rows to concatenate. Those ranges are designed to look ahead just 10 rows. Even if the total range is 1000, the lookahead range can still be 10.

Anyway, glad we could help! :biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,373
Messages
6,124,548
Members
449,170
Latest member
Gkiller

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