![]() |
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 |
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 |
All times are GMT +1. The time now is 05:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com