Find & Delete

meangreen

Board Regular
Joined
Jan 29, 2007
Messages
169
I have a column of names. Some are 'Last, First', but others are 'Last, First / Last, First'. In other words some contain 1 person's full name and the others have 2 peoples full name. I need to go thru the column and delete the "/" and the second persons name when necessary. Is there a quick and easy way to just delete eveything that follows the "/"?

For example:
Here's what I have - John Doe / Jane Doe
Here's what I need - John Doe
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

arthurbr

Well-known Member
Joined
Dec 8, 2006
Messages
2,557
Office Version
  1. 365
  2. 2010
Try selecting the whole column, go to : Data -text to columns - use the "/" as delimiter and don't import the second column

HTH
 
Upvote 0

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,456
Hello meangreen,
I absolutely agree with arthurbr's solution, however I'd take it a step further.
According to your example data, that will make the cells look the way you seem to want,
but... you'll notice the cells that had the extra name before doing the text to columns will
now actually have an extra space after the name that's left.
This may not be a problem, but then again, maybe it could.
Doing text to columns will place the unwanted part of the cell values in column B.
(Go ahead & delete those values.) Then (with a blank column B), in B1 enter: =TRIM(A1).
Copy this down column B. Copy column B, PasteSpecial (as value) and then delete column A.

Hope it helps.
 
Upvote 0

Forum statistics

Threads
1,190,962
Messages
5,983,873
Members
439,868
Latest member
Shadrack

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
Top