Copy Occupied cells within a range and Paste to a different cell

cbye

New Member
Joined
Feb 2, 2022
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hi, I get reports that we need to move certain cells around to make them more readable. The Header is in Row4. The occupied cells are somewhere between A5 and A300, each report is different. I need to copy or cut whichever cell is occupied and paste it one column over and one row down. IE CellA4 is hostname and CellB4 is Machine Type. I don't want these to move. Cell A5 is hostnameA. This needs to move to B6, right under the machine type. They are spaced random within A5 and A300 but they always will be pasted one column over and one row down. I am fairly new to VBA and have tried several Range commands but I always seem to copy all the cells and when I paste them in colB, they write over the existing data. Thanks in advance.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,215,062
Messages
6,122,925
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top