removing space in specific place

johnmerlino

Board Regular
Joined
Sep 21, 2010
Messages
94
Hey all,

I have this query:
Code:
=IF( ISERROR( SEARCH("&", A3) ), IF( ISERROR( SEARCH(" ", A3) ), A3, LEFT(A3,LOOKUP(2^15,FIND(" ",A3,ROW(INDIRECT("1:"&LEN(A3)))))-1)),SUBSTITUTE(A3,MID(A3,FIND(",",A3,1)+1,FIND("&",A3,1)-FIND(",",A3,1)),""))

Problem is it takes this:
CATANESE,SALVATORE J & OLGA M

converts to this

CATANESE, OLGA M

There is a space between the comma and the first name.

Is there a quick solution to get it like this:
CATANESE,OLGA M

where there is no space between comma and first name

Thanks for response.

 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,223,098
Messages
6,170,103
Members
452,302
Latest member
TaMere

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