+ Reply to Thread
Results 1 to 7 of 7

Autofill selection down to last row

  1. #1
    Registered User
    Join Date
    11-01-2011
    Location
    Twente, Nederland
    MS-Off Ver
    Excel Professional Plus 2019
    Posts
    40

    Autofill selection down to last row

    Hi,

    I have a macro, that will add records to my table using vertical lookup formulas in several columns from data in another worksheet.
    Before I run the macro, I add the record-id's for the new records in column A.
    Then I run the macro.
    Everything runs smoothly, until the Autofill copies the formulas from the first new record down to the last new record.

    What do I need to change in the code, to make the autofill do it's job correctly?
    Attached are two Screenshots. One with my code (snap2.jpg) and one with a view of part of my table (snap1.jpg)
    Snap1.jpg
    Snap2.jpg.
    Please Login or Register  to view this content.
    Last edited by pluginguin; 11-02-2011 at 11:34 AM. Reason: VBA-code requested

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Autofill selection down to last row

    You don't need to use Select when writing VBA code. If you post the code rather than an image I can revise it for you (remember to use code tags).

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    11-01-2011
    Location
    Twente, Nederland
    MS-Off Ver
    Excel Professional Plus 2019
    Posts
    40

    Re: Autofill selection down to last row

    Hi Dom,

    I added the code.

    Thanks,

    Tijs

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Autofill selection down to last row

    Here you go:

    Please Login or Register  to view this content.

    Dom

  5. #5
    Registered User
    Join Date
    11-01-2011
    Location
    Twente, Nederland
    MS-Off Ver
    Excel Professional Plus 2019
    Posts
    40

    Re: Autofill selection down to last row

    Thanks,

    working like a charm.

    Only one issue... when I save the file it displays a message that it can not save external links. Probably because they are in the VBA-code.
    Can something be done about this aswell?

    Regards,

    pluginguin

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Autofill selection down to last row

    Hi,

    It won't matter that the external file name is mentioned in the code. There must be a formula or something referring to an external file still in the workbook.

    Dom

  7. #7
    Registered User
    Join Date
    11-01-2011
    Location
    Twente, Nederland
    MS-Off Ver
    Excel Professional Plus 2019
    Posts
    40

    Re: Autofill selection down to last row

    Ok, I will have a look in the morning. Thanks for the help.

+ 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