Concatenate text with spaces and ignore blank cells, and also the first blank cell.

kozlikmak

New Member
Joined
Jul 11, 2022
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi, i have a problem with my sheet. First of all sorry for my bad english. I want to concatenate text with spaces and to ignore blank cells. I have a formula =IF(B2="";"";B2)&IF(C2="";"";" "&C2)&IF(D2="";"";" "&D2)&IF(E2="";"";" "&E2)&IF(F2="";"";" "&F2)&IF(G2="";"";" "&G2), but it doesn't work for first blank cell. Can you suggest me the new formula or just change the current formula?
 

Attachments

  • image_2022-07-11_143611820.png
    image_2022-07-11_143611820.png
    4.2 KB · Views: 7

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi & welcome to MrExcel.

What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
How about
Excel Formula:
=TRIM(B2&" "&C2&" "&D2&" "&E2&" "&F2&" "&G2)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

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