+ Reply to Thread
Results 1 to 2 of 2

Autofilling Formula

  1. #1
    Registered User
    Join Date
    08-02-2019
    Location
    Stockholm
    MS-Off Ver
    Office Pro
    Posts
    1

    Autofilling Formula

    Hi,

    I am very new to VBA and programming in general so hope my explanation makes sense.

    I would like to establish a macro that would do a VLOOKUP for a cell that is offset by (0,11) in relation to the last row of Column A. The Macro will then proceed to do a VLOOKUP autofill all the way up to row 2.
    To show an example:

    There are 200 rows in my active sheet. The macro should go to row 200, Column L and Do a VLOOKUP for the data that is in Row 200 Column A, and look in a table in a different sheet called Sheet2. Then it Will do a VLOOKUP for Row 199 Column L in the same sheet and so on, up to Row 2.

    I want to be able to use the Macro with varying number of rows in Column A, so in some sheets there may be 200 cells with data, in a different sheet there may be 300.

    This is what i have for now, but the Formula does not seem to be working and I am yet to get to the part where i do the autofill. The big issue is for me to select the cell and get formula to work:
    Please Login or Register  to view this content.
    Any help is greatly Appreciated.

    Thanks
    Last edited by alansidman; 08-02-2019 at 10:40 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Autofilling Formula

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Formula not autofilling like I want it to
    By allbiblio in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-27-2015, 03:58 PM
  2. Formula Not Autofilling
    By Laura88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2013, 08:59 AM
  3. Formula not Autofilling.
    By Capt.Sausage in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-22-2012, 01:32 AM
  4. Autofilling formula using a Macro
    By bungeejumper2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 01:27 PM
  5. Autofilling of formula for every 5th row
    By jasme in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2011, 09:56 PM
  6. Macro for autofilling formula
    By Gus80 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2008, 06:32 PM
  7. Autofilling a formula: not working?
    By pikapika13 in forum Excel General
    Replies: 3
    Last Post: 03-16-2006, 12:50 PM

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