OFFSET and CONCATENATEMULTIPLE: can they be used together?

itr674

Well-known Member
Joined
Apr 10, 2002
Messages
1,786
Office Version
  1. 2016
Platform
  1. Windows
Can OFFSET be added to CONCATENATEMULTIPLE so the range will change accordingly as the formula is copied down the rows?

I am using UDF CONCATENATEMULTIPLE to combine text that in a range of cells to sentences in a single cell.

Using UDF CONCATENATEMULTIPLE to get a range of cells into one single cell.
IF(B2<>1,"",CONCATENATEMULTIPLE(C$2:C$3,""))

Then using SUBSTITUTE to add a carriage return and "*" at the beginning of each sentence.
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($E2,".","."&CHAR(10)&"* ",1),
".","."&CHAR(10)&"* ",2),".","."&CHAR(10)&"* ",3),".","."&CHAR(10)&"* ",4),".","."&CHAR(10)&"* ",5),
".","."&CHAR(10)&"* ",6),".","."&CHAR(10)&"* ",7),".","."&CHAR(10)&"* ",8),".","."&CHAR(10)&"* ",9),".","."&CHAR(10)&"* ",10),
".","."&CHAR(10)&"* ",11))
 

Attachments

  • Concat1.png
    Concat1.png
    23.6 KB · Views: 21
Please try at E2

=IF(B2=1,SUBSTITUTE(CONCATENATEMULTIPLE(C2:INDEX(C2:C10,MATCH(2,INDEX(1/(A2:A10=A2),)))," "),".",CHAR(10)&"*"),"")

That worked also! trying to see if I can get rid of the last "*".
The rabbit ran
* Then stopped
* then ate some fruit
* But then changed the mind
* and they all lived together
*
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Messy data = messy formula, try

=SUBSTITUTE(TRIM(IF(B2<>1,"",CONCATENATEMULTIPLE(C2:INDEX(C:C,AGGREGATE(14,6,ROW(A2:A20)/(A2:A20=A2),1))," "))),".",CHAR(10)&"* ")

edit:- moved position of TRIM function.

I figured it out but you were faster!
You do not know how many times a day I say "messy", or "the problem is"...
You folks on here are the only ones that understand.
THANK YOU for the help.
 
Upvote 0
You do not know how many times a day I say "messy", or "the problem is"...
There are some things that you can not polish, you can only roll them in glitter to try and make them look better ?
 
Upvote 0
Please try at E2

=IF(B2=1,SUBSTITUTE(CONCATENATEMULTIPLE(C2:INDEX(C2:C10,MATCH(2,INDEX(1/(A2:A10=A2),)))," "),".",CHAR(10)&"*"),"")

Bo_Ry, thank you also for your help!
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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