Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open new record with selected fields from previous record | Excel Discussion (Misc queries) | |||
Macro to work only on selected worksheets | Excel Discussion (Misc queries) | |||
How do I record a macro which should work on multiple files ? | Excel Discussion (Misc queries) | |||
Record Macro Relative does not work? | Excel Discussion (Misc queries) | |||
Record Macro Relative does not work? | Excel Discussion (Misc queries) |