Hi All, I'm trying to fill C6 with value of 1 then selecting that and filling the cell below it with series until the last row of B, my code is not working. whats wrong? thanks
Sub Fillnumber() ActiveSheet.Unprotect curr_row = Range("C6").Row curr_col = Range("C6").Column last_row = Range("B65336").End(xlUp).Row 'last_col = Range(anchor_cell).Offset(0, 1).End(xlToRight).Column Range("C6").Select On Error Resume Next Range("C6").FormulaR1C1 = 1 Range("C6").Select Selection.AutoFill Destination:=Range("C6:C" & "last_row"), Type:=xlFillSeries Range("C6").Select ActiveSheet.Protect End Sub -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe To unsubscribe from this group, send email to excel-macros+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.