+ Reply to Thread
Results 1 to 4 of 4

Range Query - Selective cells

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Range Query - Selective cells

    Hi folks

    My mind seems to have drawn a blank on this one!

    I'm trying to do the following...

    >Range(P & i).Select
    >
    >Selection.AutoFill Destination:=Range("A & i":"A & i+1"), Type:=xlFillDefault

    where 'i' is the integer for the last row number

    I'm looking to return - Range(A1:A2)

    But I cant remeber how to do it - Help!

    TVM

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    What exactly are you trying to do?

    You first select a cell in column P but then you try to autofill column A.

    I don't think that's actually possible as the destination rangde for autofill must include the source range.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Range Query - Selective cells

    Sorry - ignore that - my typo error!!!

    its all in Column A

    its mainly the - Range("A & i":"A & i+1")- bit that im trying to sort out

    TVM

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    To get Range("A1:A2") you can use this:
    Please Login or Register  to view this content.
    Or this:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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