Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenate Four Columns With Seperators
Hi,
I have a spreadsheet with four columns, each of which may or may not have data in them, that I would like to combine into one single string. Each column that has data in it needs to be seperated by a "-". The possible scenarios that I can think of are listed. DRG_LINE1 - DRG_LINE2 - DRG_LINE3 - DRG_LINE4 DRG_LINE1 - DRG_LINE2 - DRG_LINE3 DRG_LINE1 - DRG_LINE3 - DRG_LINE4 DRG_LINE1 - DRG_LINE2 - DRG_LINE4 DRG_LINE1 - DRG_LINE2 DRG_LINE1 - DRG_LINE3 DRG_LINE1 - DRG_LINE4 DRG_LINE2 - DRG_LINE3 - DRG_LINE4 DRG_LINE2 - DRG_LINE3 DRG_LINE3 - DRG_LINE4 DRG_LINE2 - DRG_LINE4 DRG_LINE2 DRG_LINE3 DRG_LINE4 NOTHING AT ALL I assume that I can do this some with some ID, AND and CONCATENATE functions, but was ondering if someone had already done something like this that they would be willing to share? Thanks, Steve |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Concatenate Four Columns With Seperators
=A1&IF(B1<""," _ "&B1,"")&IF(C1<""," _ "&C1,"")&IF(D1<""," _ "&D1,"")
-- HTH Bob Phillips (replace somewhere in email address with googlemail if mailing direct) "Stephen A. Gye" wrote in message ... Hi, I have a spreadsheet with four columns, each of which may or may not have data in them, that I would like to combine into one single string. Each column that has data in it needs to be seperated by a "-". The possible scenarios that I can think of are listed. DRG_LINE1 - DRG_LINE2 - DRG_LINE3 - DRG_LINE4 DRG_LINE1 - DRG_LINE2 - DRG_LINE3 DRG_LINE1 - DRG_LINE3 - DRG_LINE4 DRG_LINE1 - DRG_LINE2 - DRG_LINE4 DRG_LINE1 - DRG_LINE2 DRG_LINE1 - DRG_LINE3 DRG_LINE1 - DRG_LINE4 DRG_LINE2 - DRG_LINE3 - DRG_LINE4 DRG_LINE2 - DRG_LINE3 DRG_LINE3 - DRG_LINE4 DRG_LINE2 - DRG_LINE4 DRG_LINE2 DRG_LINE3 DRG_LINE4 NOTHING AT ALL I assume that I can do this some with some ID, AND and CONCATENATE functions, but was ondering if someone had already done something like this that they would be willing to share? Thanks, Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with grouping columns | New Users to Excel | |||
How do I concatenate two columns when one is in date format? | Excel Discussion (Misc queries) | |||
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns | Excel Discussion (Misc queries) | |||
Help with a formula for concatenate and search/find with 3 columns | Excel Worksheet Functions | |||
Counting the Contents of Two Columns | Excel Discussion (Misc queries) |