Solved

Autofill problem

Posted on 2013-10-29
1
152 Views
Last Modified: 2013-10-29
I am using the below code to Auto-fill but when I ise this on dates the date increases by one day. How do I change this code to copy down without incrementing.

i.e.
15/10/2013 when copied down =
16/10/2013
17/10/2013
etc


With ActiveSheet
        LastR = .Cells(.Rows.Count, "J").End(xlUp).Row
        Range("F2").AutoFill Destination:=Range("F2:F" & LastR)
    End With
0
Comment
Question by:Jagwarman
1 Comment
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 39608232
AutoFill attempts to fill based on a pattern, and with dates Excel assumes you want to increment them.  Try:

With ActiveSheet
    LastR = .Cells(.Rows.Count, "J").End(xlUp).Row
    Range("F2:f" & LastRow) = Range("F2")
End With

Open in new window

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now