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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top