Removing my " " from a formula if the cells are empty with writing loads of ifs?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
I have a simple formula to combine a number of cells and put a space between each cell, the problem is not all the cells will always have data in them so I end up with lots of spaces in a row
if the first cell and last cell had names in them for example instead of "Tom Bill" I'd get "Tom BILL" you can see how this is annoying!
is there a way to only put the spaces between the cells with data in them?

this is the formula I currently use:

Code:
=$AI$27&" "&$AI$28&" "&$AI$29&" "&$AI$30&" "&$AI$31&" "&$AI$32&" "&$AI$33&" "&$AI$34&" "&$AI$35

thanks for your help

Tony
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Oh, wow, that's one I didn't think of, thank you very much for that,
Brilliant,
Thanks for your help.
Tony,
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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