+ Reply to Thread
Results 1 to 4 of 4

Code as alternative for SUM(SUMIF...)

  1. #1
    Registered User
    Join Date
    07-10-2015
    Location
    CZECH
    MS-Off Ver
    Office 365
    Posts
    53

    Code as alternative for SUM(SUMIF...)

    Dear experts,
    could you please help me with VBA code what will do the same as very slow matrix:

    Please Login or Register  to view this content.
    In „Sheet1“ I would like to calculate in cell A1 total weight of loaded boxes found in range „B3:K66“. Boxes details can be found in Sheet2 in Range A1:L, weight is in column I.
    Thank you very much.
    vendam

    Picture.JPG
    Attached Files Attached Files

  2. #2
    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
    49,655

    Re: Code as alternative for SUM(SUMIF...)

    Just don't use full column references. Use something like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    with a sufficiently large end row number, or define a couple of Dynamic Named Ranges for columns A and I

    So, like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    where
    BOX:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and
    WEIGHT:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note that both are based on the number of rows in column A for consistency
    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


  3. #3
    Registered User
    Join Date
    07-10-2015
    Location
    CZECH
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Code as alternative for SUM(SUMIF...)

    Hello, thank you for help.
    In new workbook it´s super fast, in my macroworkbook it´s very slow also.
    I have to check all matrix and calculation - as try to improve calculation time.
    vendam

  4. #4
    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
    49,655

    Re: Code as alternative for SUM(SUMIF...)

    You're welcome. Thanks for the rep.

+ 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] Alternative to SUMIF
    By oneyejack77 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-07-2018, 05:26 PM
  2. Need an Alternative to SumIF
    By caliskier in forum Excel General
    Replies: 4
    Last Post: 02-22-2012, 01:32 PM
  3. Alternative to SUMIF
    By ltmaiyk in forum Excel General
    Replies: 2
    Last Post: 01-22-2010, 12:06 AM
  4. SUMIF Alternative
    By rwall in forum Excel General
    Replies: 1
    Last Post: 04-05-2009, 07:21 PM
  5. =SUMIF() problem/alternative
    By grant606 in forum Excel General
    Replies: 3
    Last Post: 11-30-2007, 01:58 PM
  6. SUMIF Alternative?
    By qflyer in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-06-2005, 10:05 AM
  7. SUMIF Alternative?
    By qflyer in forum Excel General
    Replies: 1
    Last Post: 06-20-2005, 02:05 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