Macro for Fill Handle

chrono2483

Board Regular
Joined
Aug 23, 2014
Messages
164
Office Version
  1. 2016
Hello,

A
B
C
D
1
December 1
Hot Dog
2
2
December 1
Hot Dog
3
3
December 1
Hot Dog
4
4
December 1
Hot Dog
6
5
December 1
Hamburger
7
6
December 1
Hamburger
8
7
December 1
Hamburger
1
8
December 2
Hot Dog
5
9
December 2
Hot Dog
7

<tbody>
</tbody>


Hoping someone could help with the following. I searched online for a macro (piece together a macro to do the following):

I want to be able to auto fill/fill handle data in Column C, so that C1 copies down to C4, then find the next Cell with data in Col C (C5) and copy down to C7, etc.

I've tried the following:

Dim lRow As Long
lRow = Cells(Rows.Count,1).End(x1up).Row
Range("C:C").autofill destination:=range("C:C" & cells(rows.count,"C").end(xlup).row)

But I don't think I've applied the code correctly.

Would anyone be able to help?

Thank you.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Do you want to fill in the blanks in column C?
 
Upvote 0
perhaps this as part of the loop
Code:
        If ActiveSheet.ActiveCell.Value = "" Then
        ActiveSheet.ActiveCell.Value = ActiveSheet.ActiveCell.Offset(-1, 0).Value

also, how are you determining when to end the loop
 
Upvote 0
It won't resolve your issue but just for future reference the red 1 in the below should be a lower case L.

Cells(Rows.Count,1).End(x1up).Row
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,184
Members
448,554
Latest member
Gleisner2

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