+ Reply to Thread
Results 1 to 3 of 3

Auto Add Column with New Data | VBA

  1. #1
    Registered User
    Join Date
    08-14-2020
    Location
    Plainfield
    MS-Off Ver
    365
    Posts
    9

    Auto Add Column with New Data | VBA

    Hello!

    I have a worksheet with teammate information. This sheet tracks daily performance followed by a 5 Day Average, 4 Week Average and an Direct/Indirect Percentage on job functions. Currently, I have built a formula to pull data from a separate tab (data from a report) that I paste in each day. This formula is copied across all employees for each day of the month. I un-hide yesterdays date, hide the rest of the month, then copy and paste that new data as values so it doesn't change when the next days data is pasted in. Doing so isn't an issue but I'm wondering if there is an easier way to do this?

    What I would like to accomplish is this...to paste data in the "Performance Data" tab and have that automatically create a new column on the "Aug20" tab (in this case, it would create a new column for 20-Aug. It would also need to set the previous tab as "values" while transferring the formula over to the next column. Is this possible? or at least something similar I can modify?

    Thank you for any/all help!

    Spreadsheet.PNG
    Last edited by techwalker; 09-01-2020 at 11:13 AM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Auto Add Column with New Data | VBA

    The easiest thing to do is to record a macro using RELATIVE referencing while you complete the task.

    Capture.JPG

    Then, if you select the same relative cell that you had started with when recording the macro BEFORE you run the recorded macro, the steps will be performed on the correct range.

    For example, you have column Z with formulas, starting in row 2. Select Z2, then do your stuff. Then next time, select AA2 - the new column of formulas starts there - and run the macro.

    To use RELATIVE referencing, you may need to customize your ribbon to show the "Developer" tab:

    Capture 2.JPG
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    08-14-2020
    Location
    Plainfield
    MS-Off Ver
    365
    Posts
    9

    Re: Auto Add Column with New Data | VBA

    Ah, understood! I had tested with Macro recording but did not use relative reference, so I abandoned that thought process. I greatly appreciate your insight! I'll dig into this later this afternoon.

    Thank you

+ 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. Replies: 2
    Last Post: 05-18-2020, 12:30 AM
  2. Replies: 4
    Last Post: 12-26-2019, 06:45 AM
  3. Auto-adjust # of rows in a column that have a formula based on adjacent column data?
    By Norcal1 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 05-31-2018, 02:03 PM
  4. Auto transfer data from one column to another
    By thomasrepair in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-12-2016, 01:06 AM
  5. [SOLVED] Need data in column K to be auto populated, depending on drop down selection in column J
    By skeithnavo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2015, 11:53 AM
  6. Replies: 0
    Last Post: 05-22-2014, 12:47 PM
  7. Auto Date Stamp Column A when data in Column B
    By medihx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2011, 06:56 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