Excel Macro query

nofootprints

New Member
Joined
Mar 20, 2011
Messages
3
Please help me to write a macro to perform a basic function. Sadly i am so thick and dont seem to be able to sort it out myself.

i have a spreadsheet with all information in column A
The information is in cells as follows

A1
A3
A5
down to 16800
every second row is blank

I need to move the information in the cells as follows

A1 static
A3 to B1
A5 to C1

Then it loops

A7 to A2
A9 to B2
A11 to C2

Loops again

A13 to A 3
A15 to B 3
A 17 to C3

and so on.

Really sorry to ask for something so basic.

Additionally please advise on best way to progress with a basic knowledge
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Code:
Sub mover()
Dim srcRowCtr As Long, destRowCtr As Long, colCtr As Long
destRowCtr = 1
colCtr = 1
For srcRowCtr = 1 To 16800 Step 2
    Cells(destRowCtr, colCtr).Value = Cells(srcRowCtr, 1).Value
    colCtr = colCtr + 1
    If colCtr = 4 Then
        colCtr = 1
        destRowCtr = destRowCtr + 1
    End If
Next
Range("A" & destRowCtr & ":" & "A" & srcRowCtr).Delete
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,596
Messages
6,179,802
Members
452,943
Latest member
Newbie4296

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