+ Reply to Thread
Results 1 to 3 of 3

Adding Record to data table + preserve array formulas in specific columns

  1. #1
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Adding Record to data table + preserve array formulas in specific columns

    Hi, I have an excel Table with 14 columns. Columns 1 to 5 contain numerical values. Columns 6 to 14 contain array formula. The numerical values in columns 1 to 5 are fed to the array formulas in the other columns.

    I have a userform with which users can create new "Records" (i.e. rows) in the data Table.
    Users input 5 numerical values in the userform (value1 to value5) which are then added to the data Table with the following:

    Please Login or Register  to view this content.
    The code above works like a charm for adding the values to the Table BUT it also replaces/overwrites the array formulas in Columns 6 to 14 with blanks.

    Is there a way to use the ".ListRows.Add.Range" statement (or other statements) while preserving the array formulas in the other columns? Objective is to have Columns 1 to 5 filled with Values 1 to 5 but to keep the formulas in Columns 6 to 14.

    I tried:
    Please Login or Register  to view this content.
    but it does not work.

    Any help would be greatly appreciated.

  2. #2
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Adding Record to data table + preserve array formulas in specific columns

    Seems like i found a way to make it work. Might not be super clean/efficient but at least it works...

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Adding Record to data table + preserve array formulas in specific columns

    Thank you for posting the solution. It will surely help someone facing the same problem as you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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