How to record macro to work on selected column/row?

  • Thread starter Thread starter Olezhka
  • Start date Start date
O

Olezhka

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
 
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
 
Back
Top