+ Reply to Thread
Results 1 to 10 of 10

Autofill Destination Range

  1. #1
    Registered User
    Join Date
    06-27-2013
    Location
    Va Beach
    MS-Off Ver
    Excel 2003
    Posts
    38

    Autofill Destination Range

    I am running in to a problem that maybe someone can solve.

    I am trying to use a range based on the last cell of column P to fill in the data from O15:016 down to the what line Column P's Last row is.

    J15 and J16 have the custom formating so I can get it to copy the format over to O15 and O16, but when I try to get auto fill to select the two and copy to the bottom of the list I get Method 'Range' of object '_Global' failed

    Please Login or Register  to view this content.
    any help would be appreciated

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Autofill Destination Range

    Don't know why you have Range(Range(...)).

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-27-2013
    Location
    Va Beach
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Autofill Destination Range

    I took the extra range out
    Please Login or Register  to view this content.
    and it gave me Autofill method of Range class failed.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Autofill Destination Range

    There could be a problem with the range you are trying to autofill, what is it?

  5. #5
    Registered User
    Join Date
    06-27-2013
    Location
    Va Beach
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Autofill Destination Range

    The report size changes daily. So monday it maybe 50 entries long where on Tuesday it could 1100 entries. But row 15 is where I enter the data. So after I format O15:O16 I need to copy those two lines and start from O17 and go to the last O row(basically the Last row of P since O is blank). So if the last row of P is 90 it would autofill from O17:O90.
    Last edited by ERaasio; 03-14-2014 at 02:15 PM. Reason: changed if to of

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Autofill Destination Range

    What is it when you get the error?

    Also, what are you actually autofilling?

  7. #7
    Registered User
    Join Date
    06-27-2013
    Location
    Va Beach
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Autofill Destination Range

    What is it when you get the error?
    Error is:
    Run-Time error '1004':
    AutoFill method of Range class failed

    Also, what are you actually autofilling?
    Location Name (the name of the center that sent the data) with the formating of first line with no cell shading, the second with.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Autofill Destination Range

    I meant what is the range.

    The reason I'm asking that is because under certain conditions AutoFill can fail, for example if the destination range does not include the source range.

    PS What happens if you replace Selection with the source range for the autofill?

  9. #9
    Registered User
    Join Date
    06-27-2013
    Location
    Va Beach
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Autofill Destination Range

    The reason I'm asking that is because under certain conditions AutoFill can fail, for example if the destination range does not include the source range.
    Norie you ROCK. Not including the source was the reason. I changed the code to read:

    Please Login or Register  to view this content.
    and it works like a charm now.

    Thank you so much. I add reputation to your post. Thank you again.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Autofill Destination Range

    Oops, I really should have noticed that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Autofill a destination range using last row value
    By jaym911 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2013, 12:07 PM
  2. [SOLVED] AutoFill Destination Unknown Range
    By sperry2565 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-08-2013, 04:53 PM
  3. How to extend Range.AutoFill Destination down an addition 3 rows?
    By BBoydAnchor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2011, 10:51 AM
  4. Autofill in VBA with a dynamic "Destination" range
    By ConneXionLost in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2011, 04:55 PM
  5. Selection.Autofill Destination:=Range(ActiveCell.Value)
    By Shaka215@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-23-2006, 06:20 PM

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