+ Reply to Thread
Results 1 to 16 of 16

How to speed up the calculation

  1. #1
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    How to speed up the calculation

    Hello,

    In my sample I use the following code, the code is working fine just my problem is that the calculation time is too long in the original file (more than 10 minutes), because the sheet BOM has more than 10.000 rows.

    The target of the formula on sheet Evaluation, column Q: if the material (sheet Evaluation column D) has 1 "Active melange" then "Mono material" if it has 2 then "Bi material".

    Could somebody provide me a faster/simplier solution?

    Please Login or Register  to view this content.
    The sample file has been added to this sheet.

    Thanks in advance the reply!
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to speed up the calculation

    Hello Villalobos,

    This should be faster. Your big problem was using array formulas with a large data set. The formulas were also doing a lot of extra work that was not needed to get the results.

    On the "Evaluation" worksheet column "R" is used as helper column. Column "S" uses column "R" to determine the material type.


    Here are the two formulae in columns "R" and "S":

    Cells R9:R120 =SUMPRODUCT(--(D9=BOM!$C$9:$C$120),--(BOM!$S$9:$S$120="ACTIVE MELANGE"))

    Cells S9:S120 =IF(R9=0,"Not Assigned",IF(MOD(R9,2)=1,"Mono Material", IF(MOD(R9,2)=0,"BI Material")))

    NOTE: Drag the formulae down as far as needed. DO NOT USE Ctrl+Shift+Enter to confirm the formulae!
    Last edited by Leith Ross; 05-09-2015 at 11:38 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    Re: How to speed up the calculation

    Hello Leith Ross,

    Thank you for your time! I checked your proposal but unfortunately not give me back the desired results. Please, could you see the attached file.
    Attached Files Attached Files

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up the calculation

    Hi Villalobos,
    try it
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    Re: How to speed up the calculation

    Hi nilem,

    Your solution is WORDCLASS for me, and working perfectly in my sample file.
    But when I use in the original file (with the original data set) there are some problem, please could you have look this file (only 232 KB)?
    Attached Files Attached Files

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up the calculation

    Hi Villalobos,
    it is very difficult to understand the logic of your issue.
    Whence undertake values of the helper column 'S' on the sheet 'BOM'?

  7. #7
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    Re: How to speed up the calculation

    I try to summarize the concept:

    On the sheet BOM there are the all active status bill of materials / material. The "Alternative BOM" column is contain the counters (<-- if one material has more than 1 unique counter it means that it has more than one active bill of material and so on). The column S is display that if the "Alternative BOM" has or hasn't got "Active melange". This value is delivered, there is a simple VLOOKUP formulae behind in the original file and just check that what is the status of the melange (the number of melange is not listed in the sample file) in the BOM. Do you need these values to the calculation?

    On the Evaluation sheet, in column Q my target is that to know how many unique "Active melange" is/are in the unique "Alternative BOM"/material.
    There are only 3 options, if the value is 0 <= Not assigned active melange to the BOM, 1 <= Mono material, only 1 unique active melange per alternative BOM or 2 <= BI material, there are 2 unique active melanges per alternative BOM.

    I hope it is help for you, let me know if you need more.

    The array formulae gave me the desired result but the calculation time is to long, 10 minutes.

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up the calculation

    Hi Villalobos,
    Let's take a look at the material "8975144". Why it has the status of "Mono material" (as you said, there are 2 unique active melanges per alternative BOM #3)?

  9. #9
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    Re: How to speed up the calculation

    you catched me... my array formula is wrong...
    What can we do?

  10. #10
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up the calculation

    please write manually the desired result for this example
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    Re: How to speed up the calculation

    Hello nilem,

    I placed manually in column R (sheet Evaluation).
    Attached Files Attached Files

  12. #12
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up the calculation

    last question
    8024170 - "Mono material"
    It's not a mistake?

  13. #13
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    Re: How to speed up the calculation

    no, "Mono material" due to the higher "Alternative BOM" counter

  14. #14
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up the calculation

    Ok, try this
    There is only one condition. The counter in the column "Alternative BOM" must be sorted in ascending order within a single group of materials "Material (Plant)" (as it have now on the sheet "BOM")
    Please Login or Register  to view this content.
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    12-23-2013
    Location
    Hungary
    MS-Off Ver
    Excel 2013
    Posts
    331

    Re: How to speed up the calculation

    Спасибо большое!

  16. #16
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up the calculation

    На здоровье

+ 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] Calculation speed
    By Journeyman3000 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-17-2014, 07:58 PM
  2. How to increase the calculation speed
    By chavanalini in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-23-2013, 04:55 AM
  3. Calculation Speed Issue
    By yawnzzzz in forum Excel General
    Replies: 1
    Last Post: 03-19-2011, 02:21 PM
  4. Calculation Speed
    By TJ in forum Excel General
    Replies: 2
    Last Post: 09-22-2005, 12:05 PM
  5. Maximum Calculation Speed
    By Ola in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2005, 11:06 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