View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
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/