+ Reply to Thread
Results 1 to 7 of 7

Program Formulas in Cells

  1. #1
    Registered User
    Join Date
    09-02-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    50

    Program Formulas in Cells

    I normally avert from macros for several reasons but I'm wondering if it is capable of helping me in this case. I have document that takes a long time to open and process even the smallest change. Is it possible and would it be more efficient to program formulas into the necessary cells via macro? If so, what kind of strategy would one use to go about programing formulas into specific cells?

    For practicallities sake, I have attached a small portion of what the main sheet that has all the formulas. Can someone please lead me in a direction of how to go about populating this LOB sheet. Thank you.

    -The sheet is called LOB. The formulas here pull data from the other sheets in the workbook
    -There are 3 items listed, however there will be about 3500 items in the final version.
    -The cells I'm considering programming are highlighted in light blue. These cell formulas don't change; they are the same for every item on the list. I just use a script to paste them down the whole sheet for the amount of items needed.
    -The LOB sheet has conditional formatting, etc.
    -I'm not sure but the formulas that might be slowing things down the most might be the sumproduct formula that is in row 5.


    Any help/thoughts/direction is appreciated.
    Attached Files Attached Files
    Last edited by Questionz; 05-20-2017 at 03:41 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Program Formulas in Cells

    Your file didnt come through

    However, I have a feeling you can probably speed things up just by using more efficient formulas
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    09-02-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    50

    Re: Program Formulas in Cells

    Here is a smaller sized doc so that if someone adds to it, it hopefully won't exceed the 1 MB file limit
    Attached Files Attached Files
    Last edited by Questionz; 05-20-2017 at 03:34 AM.

  4. #4
    Registered User
    Join Date
    09-02-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    50

    Re: Program Formulas in Cells

    Hi FDibbins. Thanks for responding. The file came through now.

    I'm all ears if you have any ideas of how to replace the current sumproduct formula.

  5. #5
    Registered User
    Join Date
    09-02-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    50

    Re: Program Formulas in Cells

    perhaps I can end this thread and find a different way to ask my question and provide a better sample.

    thank you to any who read my question.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,526

    Re: Program Formulas in Cells

    Have you considered changing the Excel Options > Formulas from automatic to manual. That could allow you to make changes to the document without Excel attempting to constantly evaluate all of the formulas. When you have finished making your changes press the F9 key so those evaluations will take place before the workbook is saved.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: Program Formulas in Cells

    What I see in LOB is a lot of conditional sums trying to summarize the "database" contained in the other sheets -- which tends to make me think of a pivot table of some kind. Your source data is not really arranged in a nice database, so it is not "ready" to easily apply a pivot table to. I am not very good with pivot tables myself, but I would suggest you look into the possibility (especially if this is a long term need to keep track of and summarize this data frequently and reliably) of getting your raw data stored in a nice database (whether in Excel or other database program) so that you can summarize and query the data using pre-programmed database tools.

    Even if a pivot table does not give you the exact final table you need/want, a pivot table can do the "slow" step of conditionally summing/counting/averaging/etc. very fast (compared to formulas and VBA). Then you can pull the data for your final table from the pivot table(s).

    My thoughts on this, and it is probably worth about what you paid for it.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. Merging 2 cells in a calendar program
    By scott micklo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2016, 06:22 PM
  2. VBA-How to program sizing and placing Excel window at the start of the program
    By dr.prakash in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-17-2013, 11:45 PM
  3. Replies: 5
    Last Post: 11-03-2012, 05:10 PM
  4. VBA Program or Formulas ??
    By dyw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2007, 03:12 AM
  5. Can I program cells to display pictures?
    By Brisben in forum Excel General
    Replies: 5
    Last Post: 12-20-2006, 10:05 PM
  6. [SOLVED] Cells Program
    By Paul in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2005, 01:05 AM
  7. breaking a cell into two cells via VBA program
    By Jordan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-08-2005, 05:06 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