View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
SeanC UK[_3_] SeanC UK[_3_] is offline
external usenet poster
 
Posts: 48
Default Remove space from text in cell

Hi Dave,

If you're looking for a simple worksheet formula then SUBSTITUTE should work.

For your example write in a cell:
=SUBSTITUTE(G3," ","")



If you're using VBA then lookup the REPLACE method in the VBA help, that
should work for you.

Sean.

"Dave Birley" wrote:

First, I have a confession to make: I actually searched the available answers
first (using search text: "remove space from text in cell"). Nothing there
fit my simpler problem:

Cell G3 contains "Herkimer, Mortimer". I need to get rid of that space
("Herkimer,Mortimer") becaise I am about to search with the result into a
different WB where the data is stored without spaces.

My bet is that there's a really simple function for this <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC