Fill series of sequential numbers in blocks of 2

VBA fil down block of 2 identical sequential numbners in column B starting at row 2 until last row of data in column c.

I have searched high and low for a logical approach at  this and I cant seem to find it anywhere.

I need to be able to fill column B cell B2 downwards until last row of data in column C.


Example below:


1
1
2
2
3
3
4
4
5
5


so forth until the last row of data in column C.

I have managed to get to the point i can do it sequentially but not how i want it to work.

Any help aprciated:
Lst = Range("C" & Rows.count).End(xlUp).Row - 1
With Range("B2")
    .Value = "1"
    .AutoFill Destination:=Range("B2").Resize(Lst), Type:=xlFillSeries
End With

Open in new window

zack carterProject AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Please give this a try...

Lst = Range("C" & Rows.Count).End(xlUp).Row - 1
With Range("B2:B" & Lst)
    .Formula = "=QUOTIENT(ROW(),2)"
    .Value = .Value
End With

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zack carterProject AnalystAuthor Commented:
Thank you so much for your assistance. I cannot thank you enough. Its taken me 3 days to tackle this.

Also i havent heard of the "=QUOTIENT(ROW(),2)" so i have definately lerarnt something new.
1
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Zack! Glad it worked as desired.
0
Rob HensonFinance AnalystCommented:
Does it have to be VBA??

Fill in rows 2 & 3 manually with number 1. Then in B4 put formula =B2+1

Then hover the cursor over the bottom right of cell B4 until it turns to a + symbol, double click and the formula will be populated down to the extent of data in column C or column A if more data.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.