How to find and replace blank space (x) in John Smithx in Excel?

J

JoeSAT

kecause of data entry irregularities, my records look like this:
John Smith 10
John Smithx 12
John Smith 8

When I use PivotTable to sum sales, I get two sums for John Smith. How can
I find and replace the blank space x without removing the space between John
and Smith? Thank you.
 
F

Fred Smith

The Trim function will get rid of trailing spaces without affecting internal
spaces.
 
B

bpeltzer

If you create a 'helper column', you can use the trim function to remove any
leading/trailing spaces. Ex: if "John Smith " is in a1, then =trim(a1)
returns "John Smith".
 
J

JoeSAT

Works great! Many thanks!

bpeltzer said:
If you create a 'helper column', you can use the trim function to remove any
leading/trailing spaces. Ex: if "John Smith " is in a1, then =trim(a1)
returns "John Smith".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top