Combine cells with line breaks and match the lines

alejo7905

New Member
Joined
Feb 28, 2023
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
Sample:

Message IDIB RecipientMessage TypePrioritySend InstantLast Completion InstantRead TimeOutput (Combine IB Recipient / Read Time)
111111111​
Alejandro Cruz, RN
Mike Jones, MD
Carlos Escobar, MD
Staff MessageRoutine
7/1/2022 8:24​
7/28/2022 10:22​
10/05/2022 08:36:27 PM
07/28/2022 10:22:23 AM
07/05/2022 09:27:03 PM
Alejandro Cruz, RN | 10/05/2022 08:36:27 PM
Mike Jones, MD | 07/28/2022 10:22:23 AM
Carlos Escobar, MD | 07/05/2022 09:27:03 PM
222222222​
Andres Liriano
Ricardo Parra, MD
Gerald Christopher
Staff MessageRoutine
7/1/2022 10:26​
7/1/2022 10:31​
07/01/2022 10:31:34 AM
07/01/2022 01:09:58 PM
Andres Liriano |
Ricardo Parra, MD | 07/01/2022 10:31:34 AM
Gerald Christopher | 07/01/2022 01:09:58 PM
333333333​
Christopher Burdett, RN
Andres Liriano
Lia Guerrero, RN
Gerald Christopher
Rx ResponseRoutine
7/1/2022 17:54​
7/5/2022 9:44​
07/06/2022 11:43:19 AM

07/05/2022 09:44:50 AM
07/05/2022 10:09:16 AM
Christopher Burdett, RN | 07/06/2022 11:43:19 AM
Andres Liriano |
Lia Guerrero, RN |07/05/2022 09:44:50 AM
Gerald Christopher |07/05/2022 10:09:16 AM
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFGH
1Message IDIB RecipientMessage TypePrioritySend InstantLast Completion InstantRead Time
2111111111Alejandro Cruz, RN Mike Jones, MD Carlos Escobar, MDStaff MessageRoutine7/1/2022 8:247/28/2022 10:2210/05/2022 08:36:27 PM 07/28/2022 10:22:23 AM 07/05/2022 09:27:03 PMAlejandro Cruz, RN |10/05/2022 08:36:27 PM Mike Jones, MD |07/28/2022 10:22:23 AM Carlos Escobar, MD |07/05/2022 09:27:03 PM
3222222222Andres Liriano Ricardo Parra, MD Gerald ChristopherStaff MessageRoutine7/1/2022 10:267/1/2022 10:31 07/01/2022 10:31:34 AM 07/01/2022 01:09:58 PMAndres Liriano | Ricardo Parra, MD |07/01/2022 10:31:34 AM Gerald Christopher |07/01/2022 01:09:58 PM
4333333333Christopher Burdett, RN Andres Liriano Lia Guerrero, RN Gerald ChristopherRx ResponseRoutine7/1/2022 17:547/5/2022 9:4407/06/2022 11:43:19 AM 07/05/2022 09:44:50 AM 07/05/2022 10:09:16 AMChristopher Burdett, RN |07/06/2022 11:43:19 AM Andres Liriano | Lia Guerrero, RN |07/05/2022 09:44:50 AM Gerald Christopher |07/05/2022 10:09:16 AM
Main
Cell Formulas
RangeFormula
H2:H4H2=TEXTJOIN(CHAR(10),,TEXTSPLIT(B2,,CHAR(10))&" |"&TEXTSPLIT(G2,,CHAR(10)))
 
Upvote 0
Sample:

Message IDIB RecipientMessage TypePrioritySend InstantLast Completion InstantRead TimeOutput (Combine IB Recipient / Read Time)
111111111​
Alejandro Cruz, RN
Mike Jones, MD
Carlos Escobar, MD
Staff MessageRoutine
7/1/2022 8:24​
7/28/2022 10:22​
10/05/2022 08:36:27 PM
07/28/2022 10:22:23 AM
07/05/2022 09:27:03 PM
Alejandro Cruz, RN | 10/05/2022 08:36:27 PM
Mike Jones, MD | 07/28/2022 10:22:23 AM
Carlos Escobar, MD | 07/05/2022 09:27:03 PM
222222222​
Andres Liriano
Ricardo Parra, MD
Gerald Christopher
Staff MessageRoutine
7/1/2022 10:26​
7/1/2022 10:31​
07/01/2022 10:31:34 AM
07/01/2022 01:09:58 PM
Andres Liriano |
Ricardo Parra, MD | 07/01/2022 10:31:34 AM
Gerald Christopher | 07/01/2022 01:09:58 PM
333333333​
Christopher Burdett, RN
Andres Liriano
Lia Guerrero, RN
Gerald Christopher
Rx ResponseRoutine
7/1/2022 17:54​
7/5/2022 9:44​
07/06/2022 11:43:19 AM

07/05/2022 09:44:50 AM
07/05/2022 10:09:16 AM
Christopher Burdett, RN | 07/06/2022 11:43:19 AM
Andres Liriano |
Lia Guerrero, RN |07/05/2022 09:44:50 AM
Gerald Christopher |07/05/2022 10:09:16 AM

Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFGH
1Message IDIB RecipientMessage TypePrioritySend InstantLast Completion InstantRead Time
2111111111Alejandro Cruz, RN Mike Jones, MD Carlos Escobar, MDStaff MessageRoutine7/1/2022 8:247/28/2022 10:2210/05/2022 08:36:27 PM 07/28/2022 10:22:23 AM 07/05/2022 09:27:03 PMAlejandro Cruz, RN |10/05/2022 08:36:27 PM Mike Jones, MD |07/28/2022 10:22:23 AM Carlos Escobar, MD |07/05/2022 09:27:03 PM
3222222222Andres Liriano Ricardo Parra, MD Gerald ChristopherStaff MessageRoutine7/1/2022 10:267/1/2022 10:31 07/01/2022 10:31:34 AM 07/01/2022 01:09:58 PMAndres Liriano | Ricardo Parra, MD |07/01/2022 10:31:34 AM Gerald Christopher |07/01/2022 01:09:58 PM
4333333333Christopher Burdett, RN Andres Liriano Lia Guerrero, RN Gerald ChristopherRx ResponseRoutine7/1/2022 17:547/5/2022 9:4407/06/2022 11:43:19 AM 07/05/2022 09:44:50 AM 07/05/2022 10:09:16 AMChristopher Burdett, RN |07/06/2022 11:43:19 AM Andres Liriano | Lia Guerrero, RN |07/05/2022 09:44:50 AM Gerald Christopher |07/05/2022 10:09:16 AM
Main
Cell Formulas
RangeFormula
H2:H4H2=TEXTJOIN(CHAR(10),,TEXTSPLIT(B2,,CHAR(10))&" |"&TEXTSPLIT(G2,,CHAR(10)))
Thank for the quick response, why am I getting #NAME?
 
Upvote 0
Are you using xl 365 as your profile shows?
 
Upvote 0
Ok, not sure if this will work in 2019, but try
Fluff.xlsm
ABCDEFGH
1Message IDIB RecipientMessage TypePrioritySend InstantLast Completion InstantRead Time
2111111111Alejandro Cruz, RN Mike Jones, MD Carlos Escobar, MDStaff MessageRoutine7/1/2022 8:247/28/2022 10:2210/05/2022 08:36:27 PM 07/28/2022 10:22:23 AM 07/05/2022 09:27:03 PMAlejandro Cruz, RN | 44691.8586458333 Mike Jones, MD | 07/28/2022 10:22:23 AM Carlos Escobar, MD | 44688.8937847222
3222222222Andres Liriano Ricardo Parra, MD Gerald ChristopherStaff MessageRoutine7/1/2022 10:267/1/2022 10:31 07/01/2022 10:31:34 AM 07/01/2022 01:09:58 PMAndres Liriano | Ricardo Parra, MD | 44568.438587963 Gerald Christopher | 44568.548587963
4333333333Christopher Burdett, RN Andres Liriano Lia Guerrero, RN Gerald ChristopherRx ResponseRoutine7/1/2022 17:547/5/2022 9:4407/06/2022 11:43:19 AM 07/05/2022 09:44:50 AM 07/05/2022 10:09:16 AMChristopher Burdett, RN | 44719.4884143519 Andres Liriano | Lia Guerrero, RN | 44688.4061342593 Gerald Christopher | 44688.4231018519
Main
Cell Formulas
RangeFormula
H2:H4H2=TEXTJOIN(CHAR(10),0,FILTERXML("<k><m>"&SUBSTITUTE(B2,CHAR(10),"</m><m>")&"</m></k>","//m")&" | "&IFERROR(FILTERXML("<k><m>"&SUBSTITUTE(G2,CHAR(10),"</m><m>")&"</m></k>","//m"),""))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 1
Solution
Ok, not sure if this will work in 2019, but try
Fluff.xlsm
ABCDEFGH
1Message IDIB RecipientMessage TypePrioritySend InstantLast Completion InstantRead Time
2111111111Alejandro Cruz, RN Mike Jones, MD Carlos Escobar, MDStaff MessageRoutine7/1/2022 8:247/28/2022 10:2210/05/2022 08:36:27 PM 07/28/2022 10:22:23 AM 07/05/2022 09:27:03 PMAlejandro Cruz, RN | 44691.8586458333 Mike Jones, MD | 07/28/2022 10:22:23 AM Carlos Escobar, MD | 44688.8937847222
3222222222Andres Liriano Ricardo Parra, MD Gerald ChristopherStaff MessageRoutine7/1/2022 10:267/1/2022 10:31 07/01/2022 10:31:34 AM 07/01/2022 01:09:58 PMAndres Liriano | Ricardo Parra, MD | 44568.438587963 Gerald Christopher | 44568.548587963
4333333333Christopher Burdett, RN Andres Liriano Lia Guerrero, RN Gerald ChristopherRx ResponseRoutine7/1/2022 17:547/5/2022 9:4407/06/2022 11:43:19 AM 07/05/2022 09:44:50 AM 07/05/2022 10:09:16 AMChristopher Burdett, RN | 44719.4884143519 Andres Liriano | Lia Guerrero, RN | 44688.4061342593 Gerald Christopher | 44688.4231018519
Main
Cell Formulas
RangeFormula
H2:H4H2=TEXTJOIN(CHAR(10),0,FILTERXML("<k><m>"&SUBSTITUTE(B2,CHAR(10),"</m><m>")&"</m></k>","//m")&" | "&IFERROR(FILTERXML("<k><m>"&SUBSTITUTE(G2,CHAR(10),"</m><m>")&"</m></k>","//m"),""))
Press CTRL+SHIFT+ENTER to enter array formulas.
Thank you, this is great.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

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