• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 54
  • Last Modified:

Move contents of cells within Excel file

In the attached xlsx file, the request is for the contents of every second row in column B to be moved up to the row above, in column M.
Example is show for the first two cells that have been moved.
TV-by-channel-example.xlsx
0
gregfthompson
Asked:
gregfthompson
1 Solution
 
Rgonzo1971Commented:
Hi,

pls try
Sub Macro()

For Idx = 3 To Range("B" & Rows.Count).End(xlUp).Row Step 2
    Set c = Cells(Idx, 2)
    c.UnMerge
    c.Offset(-1, 11).Value = c.Value
    c.ClearContents
Next
End Sub

Open in new window

regards
0
 
gregfthompsonAuthor Commented:
Beautiful work.

Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now