Move cell values

  • Thread starter Thread starter student
  • Start date Start date
S

student

Hi,

Need a help in Macros.

Suppose i have the foll. data

ColA Col B
1 w
2 re
3 dff
--> Empty cells
1 ed
2 23
3 24

I need to copy the cell with 3 in colA two rows up, so it should be someting
like this:

ColA Col B
1 w 3 dff
2 re
3 dff
--> Empty cells
1 ed 3 24
2 23
3 24


Thanks for help.
 
One way
for each c in selection
if c=3 then c.copy c.offset(-3,2)
next c
 

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