Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to record macro to work on selected column/row?

I want to be able to use a TRIM function, to trim the values in
particular column, then copy/paste values to the same column. How woul
I record macro to work on the particular column that I have selected
as every time, it is a different column that I work on

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default How to record macro to work on selected column/row?

Hi
you have to change the macro manually. Something like
sub foo()
dim rng as range
dim cell as range
set rng = selection
for each cell in rng
cell.value = Trim(cell.value)
next
end sub


--
Regards
Frank Kabel
Frankfurt, Germany

I want to be able to use a TRIM function, to trim the values in a
particular column, then copy/paste values to the same column. How
would I record macro to work on the particular column that I have
selected - as every time, it is a different column that I work on?


---
Message posted from http://www.ExcelForum.com/

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
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Macro to work only on selected worksheets [email protected] Excel Discussion (Misc queries) 3 January 22nd 07 07:14 PM
How do I record a macro which should work on multiple files ? Venkataraman.P.E Excel Discussion (Misc queries) 2 January 16th 05 10:26 AM
Record Macro Relative does not work? lbbss Excel Discussion (Misc queries) 3 December 13th 04 08:43 PM
Record Macro Relative does not work? lbbss Excel Discussion (Misc queries) 1 December 13th 04 07:55 PM


All times are GMT +1. The time now is 08:16 PM.

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

About Us

"It's about Microsoft Excel"