+ Reply to Thread
Results 1 to 5 of 5

VBA Perform Autofill formula in specified column name/location

  1. #1
    Registered User
    Join Date
    04-06-2021
    Location
    Indianapolis, in
    MS-Off Ver
    16
    Posts
    2

    VBA Perform Autofill formula in specified column name/location

    Hello,

    Cross-posted at MREXCEL - COULD NOT PASTE LINK
    Cross-posted at chandoo.org - COULD NOT PASTE LINK
    Cross-posted at OZGRID - COULD NOT PASTE LINK

    I have a VBA macro that will insert a new column (titled updated col..) to the right of the specified column name. Then I use a VLOOKUP and autofill in the new column to provide the updated values. The column location of the updated column is variable/dynamic. How can I make the autofill function automatically perform in the column range lu or in the adjacent column?

    I tried to write it like this
    Please Login or Register  to view this content.
    My current solution requires manually inputting the column Letter location everytime before running the VBA
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by explrll; 04-06-2021 at 03:23 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,174

    Re: Perform Autofill formula in specified column name/location

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. 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, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new, I have done it for you today.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Valued Forum Contributor
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    1,600

    Re: VBA Perform Autofill formula in specified column name/location

    Try

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,739

    Re: VBA Perform Autofill formula in specified column name/location

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    Because you are new you may not post live links so I added it for you.

    Since you have violated two rules in your first post I would suggest that you take the time to review our rules. There aren't many, and they are all important.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Registered User
    Join Date
    04-06-2021
    Location
    Indianapolis, in
    MS-Off Ver
    16
    Posts
    2

    Re: VBA Perform Autofill formula in specified column name/location

    Quote Originally Posted by maniacb View Post
    Try

    Please Login or Register  to view this content.
    Hello,

    Thanks so much that worked perfectly without requiring additional code line updates!
    Last edited by explrll; 04-06-2021 at 02:50 PM.

+ 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. [SOLVED] Formula to perform number from 1 based on numbers in column A
    By bjnockle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-14-2020, 05:04 PM
  2. [SOLVED] Macro to perform changes without cell location references
    By Snoddas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2015, 12:15 PM
  3. Need to autofill showing Excel cell number location...
    By Clutch Cargo in forum Excel General
    Replies: 1
    Last Post: 02-11-2015, 02:55 PM
  4. Only perform formula when column A contain data
    By coolkwc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-11-2015, 12:21 PM
  5. Need help with Macro to autofill formula in Column B based on length of Column A
    By soxsrules in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2013, 02:43 PM
  6. Worksheet function to Autofill formula in column A when data entered in column B
    By boylers75 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2013, 02:27 PM
  7. Replies: 2
    Last Post: 08-02-2006, 04:40 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