+ Reply to Thread
Results 1 to 3 of 3

Autofill formula across columns within excel table

  1. #1
    Registered User
    Join Date
    03-23-2019
    Location
    London
    MS-Off Ver
    2013
    Posts
    1

    Autofill formula across columns within excel table

    Hi,

    I have an excel table (ListObject), to which I am adding a column at the click of a button via a Macro.

    The macro needs to also drag the formula form the last existent column into the new column. The formula references another column within the same table.

    I am using autofill to drag along the formula into the new column, but it does not seem to be changing references. It keeps the references of the source cell (which is being used for autofill), so the value in the new column returns the same value as the existent one.

    For example say there are 3 columns in Table1:
    a) Column A - existent
    b) Column B = Column A + 1
    c) New column being autofilled onto - Column C should be equal to Column B + 1
    BUT when using autofill, Column C is returning Column A + 1, same as source.

    Does VBA autofill not work for cells that reference columns within a table?

    Mark

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,671

    Re: Autofill formula across columns within excel table

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary. Additionally, if you have existing VBA Macro, be sure to include it for analysis.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    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

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: Autofill formula across columns within excel table

    Hi mrlkmac and welcome to the forum,

    It sounds like you need to learn about Absolute vs Relative addressing. It is all about the dollar signs.

    http://www.iwillteachyouexcel.com/ex...ve-references/

    Alan is correct that we need to see a sample workbook to understand where those dollar signs go.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say 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. [SOLVED] Excel Table Autofill Formula
    By thesonofdarwin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-15-2017, 03:27 PM
  2. [SOLVED] Autofill columns with IF-formula
    By Halvor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-26-2016, 11:51 AM
  3. Replies: 8
    Last Post: 09-12-2016, 10:01 AM
  4. Replies: 1
    Last Post: 02-06-2015, 07:42 AM
  5. [Solved] Autofill Formula containing Columns
    By Wilum in forum Excel General
    Replies: 19
    Last Post: 06-07-2014, 08:24 AM
  6. Macro to Autofill columns with Formula
    By craigw02 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-20-2013, 08:53 AM
  7. Formula autofill to columns, NOT rows?
    By gaastra in forum Excel General
    Replies: 11
    Last Post: 08-13-2010, 11:35 AM

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