Textjoin for Excel 2007

tseklee

New Member
Joined
Nov 4, 2023
Messages
20
Office Version
  1. 2007
Platform
  1. Windows
Hello i am trying to join cells, separated by commas( , ) and print the result in another cell. I guess this is what "Textjoin" formula in later version of Excel does but i have to work with 2007 version which doesn't have this command implemented.
Please pay attention to the example below if row is left blank, that means i don't want only commas( ,,,) to be printed in the "Results" cells but rather also left blank.
Same for example for "Results" about the (Suzuki)Cultus row, it doesn't start with a comma like: ,Cultus,1993,GTi
So in other words it should put a comma if "Brand" has not been left empty and it should not put a comma in the end if the next cell that needs to be joined is left empty like: BMW,e30,1988 and not BMW,e30,1998,

An example:
BrandModelYearVersionResults
SuzukiSwift1993GTiSuzuki,Swift,1993,GTi
Cultus1993GTiCultus,1993,GTi
BMWe301988BMW,e30,1988
ToyotaCorolla1988VvtiToyota,Corolla,1988,Vvti
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
How about
Excel Formula:
=REPLACE(IF(A2="","",","&A2)&IF(B2="","",","&B2)&IF(C2="","",","&C2)&(IF(D2="","",","&D2)),1,1,"")
 
Upvote 1
Solution
try this:
Excel Formula:
=IF(A2<>"",A2&",","")&IF(B2<>"",B2&",","")&IF(C2<>"",C2&",","")&D2
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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