Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default Trim the entire range

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
Run Macro through an entire range [email protected] Excel Programming 2 February 7th 06 07:53 PM
VBA Trim and Application.worksheetfunction.Trim Hari Prasadh Excel Programming 3 January 19th 05 02:22 PM
Reading Entire Range Peter[_46_] Excel Programming 1 September 17th 04 04:20 PM
how do i set an entire row or column to a range? strataguru[_13_] Excel Programming 7 December 25th 03 04:08 AM


All times are GMT +1. The time now is 11:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"