+ Reply to Thread
Results 1 to 8 of 8

VBA script for dragging down formulas

  1. #1
    Registered User
    Join Date
    04-20-2011
    Location
    Isle of Man
    MS-Off Ver
    Excel 2007
    Posts
    4

    VBA script for dragging down formulas

    Hi Guys,

    I need you expert help please. Having a few issues in writing some script that will automatically drag down formulas next to some evergrowing data files. So to explain:


    I have a 'sheet' where i am importing some data from a another source.
    The headers are on row 3
    There are 24 columns of data that are being imported. from column 'A' to column 'X'
    Each time i import this data the number of lines will grow.


    So what i really need from you guys is some script that will enable me to:

    Drag some formulas down in cells 'Y4 to BB4' to the last line in the sheet. Everytime i record a macro using 'relative references' it is still refering to the last line number rather the ever growing list of lines of data.


    Any help here guys would be greatly appreciated!

    Thanks in advance

    Regards

    Nick

  2. #2
    Forum Contributor
    Join Date
    06-02-2015
    Location
    delhi
    MS-Off Ver
    2010
    Posts
    104

    Re: VBA script for dragging down formulas

    Try this simplest technique to drag down formulas

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-20-2011
    Location
    Isle of Man
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VBA script for dragging down formulas

    Hi Mandeep,

    Thanks for the response. Its not liking the second line of text though unfortunately:
    Range("y4:BB" & lr).FillDown

    Any ideas please?

    Thanks

    Nick

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA script for dragging down formulas

    What is the formula you are trying to fill down?

  5. #5
    Forum Contributor
    Join Date
    06-02-2015
    Location
    delhi
    MS-Off Ver
    2010
    Posts
    104

    Re: VBA script for dragging down formulas

    Share your sheet with formulas you want to drag

    '******************************
    'Made by :- Mandeep baluja
    'https://www.facebook.com/groups/825221420889809/
    'https://www.linkedin.com/in/mandeep-baluja-b777bb88
    Add Reputation if it helps

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: VBA script for dragging down formulas

    It's clear it's just a typo, it should be lrow on the second line too.

  7. #7
    Forum Contributor
    Join Date
    06-02-2015
    Location
    delhi
    MS-Off Ver
    2010
    Posts
    104

    Re: VBA script for dragging down formulas

    Ahh OPPZZZZ Sorry for typo

  8. #8
    Registered User
    Join Date
    04-20-2011
    Location
    Isle of Man
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VBA script for dragging down formulas

    Absolutely Fantastic! Cheers Guys!

    Your help is massively appreciated! Thanks

+ 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. Dragging formulas
    By Finalfrontier1976 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-20-2016, 10:35 AM
  2. [SOLVED] Dragging Down Formulas
    By mphillips in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2014, 02:00 PM
  3. Excel 2007 : Dragging formulas down
    By mkmed in forum Excel General
    Replies: 8
    Last Post: 06-15-2010, 12:33 PM
  4. Dragging Formulas
    By grghhn in forum Excel General
    Replies: 2
    Last Post: 05-07-2010, 01:17 AM
  5. Dragging formulas
    By Thawk in forum Excel General
    Replies: 5
    Last Post: 02-11-2009, 04:29 PM
  6. Excel 2007 : Dragging Formulas Down???
    By Jordan-Circle in forum Excel General
    Replies: 2
    Last Post: 10-15-2008, 03:47 PM
  7. [SOLVED] Dragging Formulas
    By J.D. Webster in forum Excel General
    Replies: 1
    Last Post: 02-06-2006, 05:35 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