View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Trim the entire range

If the range is a single column, you could try:

Selecting the range
data|text to columns
Fixed width and then click finish.

If you need a macro, record it when you do it manually.

Greg wrote:

Hi,

I have the following code that loops through a certain range.
For Each cel In ADINames
cel.Value = Trim(cel.Value)
Next cel

Can this be done on the entire range at once, i.e, w/o looping?

Thank you,

--
______
Regards,
Greg


--

Dave Peterson