+ Reply to Thread
Results 1 to 6 of 6

Restore Formulas with Table Arrays

  1. #1
    Registered User
    Join Date
    01-20-2023
    Location
    Lancaster, Pennsylvania
    MS-Off Ver
    365 v2301 build 16026.20200
    Posts
    15

    Restore Formulas with Table Arrays

    Hi, I need a macro to restore table columns upon the click of a button (shape). Some columns have formulas containing arrays in other tables. Other columns are to be "".
    The user will often overwrite the formulas, but later restore the original formula.
    I tried the MacroRecorder, but as soon as I added rows it no longer worked as desired.

    See the attached workbook and please let me know if you have any questions.

    Thanks!

    Reset.xlsm


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: Restore Formulas with Table Arrays

    You have table and are also using name ranges.

    If you just look at the tables then you can perhaps iterate through the like this.


    Please Login or Register  to view this content.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Restore Formulas with Table Arrays

    First problem, don't use .FormulaArray use .Formula.

    Second problem, the Table has a column called [unit $] (with a space), not [unit$]
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-20-2023
    Location
    Lancaster, Pennsylvania
    MS-Off Ver
    365 v2301 build 16026.20200
    Posts
    15

    Re: Restore Formulas with Table Arrays

    Thank you both for your willingness to help!!!

    TMS: Thank you for pointing out my errors. This was a quick fix.

    ByteMarks: Thank you for the alternate approach.
    I also removed the named ranges, as suggested.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Restore Formulas with Table Arrays

    You're welcome. Thanks for the rep.



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  6. #6
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: Restore Formulas with Table Arrays

    You're welcome. Thanks for the feedback.

+ 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] On Save, Calculate to Restore Formulas is modified. And a add totals of unique values.
    By Ajaxs87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2023, 04:02 PM
  2. [SOLVED] restore default rows in a table
    By charliec in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-14-2019, 01:31 PM
  3. [SOLVED] How do I restore original Pivot Table data?
    By Andrew C in forum Excel General
    Replies: 8
    Last Post: 12-14-2016, 03:14 AM
  4. [SOLVED] Restore formulas macro
    By JYTS in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-08-2015, 03:47 PM
  5. Remove/restore rows of table based on conditional statments
    By NAK91 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-13-2012, 03:14 PM
  6. Replies: 0
    Last Post: 08-08-2012, 09:29 PM
  7. Replies: 1
    Last Post: 12-07-2010, 04:18 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