Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I need some help writing a formula that will concatenate columns by rows but where the number of columns to be concatenated differs between the rows. I also need to place comma delimiters between each value. For Example Row1: 345 3432 5631 76523 342 Row2: 87 234 546 My results need to show: Row1: 345,3432,5631,76523,342 Row2: 87,234,546 This sounds easy, but I need Row2 to avoid showing the last two commas: 87,234,546,, Thanks for the help! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=SUBSTITUTE(A1&","&B1&","&C1&","&D1&","&E1,REPT(", ",5-COUNTA(A1:E1)),"")
"tommykraz" skrev: Hi, I need some help writing a formula that will concatenate columns by rows but where the number of columns to be concatenated differs between the rows. I also need to place comma delimiters between each value. For Example Row1: 345 3432 5631 76523 342 Row2: 87 234 546 My results need to show: Row1: 345,3432,5631,76523,342 Row2: 87,234,546 This sounds easy, but I need Row2 to avoid showing the last two commas: 87,234,546,, Thanks for the help! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This UDF will ignore blank cells
Function ConCatRange(CellBlock As Range) As String Dim Cell As Range Dim sbuf As String For Each Cell In CellBlock If Len(Cell.text) 0 Then sbuf = sbuf & Cell.text & "," Next ConCatRange = Left(sbuf, Len(sbuf) - 1) End Function =ConCatRange(select cells) Gord Dibben MS Excel MVP On Wed, 18 Jun 2008 11:20:02 -0700, tommykraz wrote: Hi, I need some help writing a formula that will concatenate columns by rows but where the number of columns to be concatenated differs between the rows. I also need to place comma delimiters between each value. For Example Row1: 345 3432 5631 76523 342 Row2: 87 234 546 My results need to show: Row1: 345,3432,5631,76523,342 Row2: 87,234,546 This sounds easy, but I need Row2 to avoid showing the last two commas: 87,234,546,, Thanks for the help! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks a million...helped a lot.
"excelent" wrote: =SUBSTITUTE(A1&","&B1&","&C1&","&D1&","&E1,REPT(", ",5-COUNTA(A1:E1)),"") "tommykraz" skrev: Hi, I need some help writing a formula that will concatenate columns by rows but where the number of columns to be concatenated differs between the rows. I also need to place comma delimiters between each value. For Example Row1: 345 3432 5631 76523 342 Row2: 87 234 546 My results need to show: Row1: 345,3432,5631,76523,342 Row2: 87,234,546 This sounds easy, but I need Row2 to avoid showing the last two commas: 87,234,546,, Thanks for the help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Concatenate info from columns into rows | Excel Discussion (Misc queries) | |||
Comparing slightly differing columns | Excel Discussion (Misc queries) | |||
Concatenate multiple rows and columns into 1 cell | Excel Discussion (Misc queries) | |||
excel charting formulas - sum of 2 columns with differing data | Charts and Charting in Excel | |||
Help with a formula for concatenate and search/find with 3 columns | Excel Worksheet Functions |