+ Reply to Thread
Results 1 to 3 of 3

Autofill range query

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Autofill range query

    I'd like to use the following code

    Cells(1, Counter).AutoFill Destination:=Range("E1:E" & lastrow)
    but I want the "E"s to be the value of "counter". How do I code this?

    Thanks.
    Last edited by bd528; 09-13-2010 at 10:29 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Autofill range query

    It's not clear what you're doing with the first cell before hand (ie if you need to use AutoFill) but

    With Cells(1,Counter)
        .AutoFill .Resize(lastrow)
    End With

  3. #3
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Autofill range query

    Perfect, thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1