+ Reply to Thread
Results 1 to 9 of 9

Simplify Long Formula

  1. #1
    Registered User
    Join Date
    02-17-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    41

    Simplify Long Formula

    Hi,

    Is anyone able to simplify the following formula:

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Simplify Long Formula

    Try this aRRAY formula.
    Please Login or Register  to view this content.
    To enter ARRAY formula,
    Paste the formula
    Don't Press Enter Key
    Press Ctrl+Shift+Enter Keys together.
    You will see {} around ARRAY formula.

  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,467

    Re: Simplify Long Formula

    One way:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    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
    02-17-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Simplify Long Formula

    Right, I've another one here. Its a simple piece of code but it sometimes causes my PC to freeze for a good few seconds (Even longer when drag filling up or down, left or right), can it be shortened? I tried to add columns H & I (i.e. $H:$I) together but it did not work, so have to do them separately.

    Please Login or Register  to view this content.
    Thanks

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Simplify Long Formula

    The single thing that can be done to improve the performance of that formula is to NOT use entire columns as range references.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Simplify Long Formula

    The most effective way to make that calculate faster would be to NOT use entire column references like C:C
    Change the references to a meaningful range like C1:C1000

    You could also cut the 8 sumproducts down to 4 by combining the H and I columns into 1 sumproduct
    =SUMPRODUCT(('C:\Files\[Worksheet.xlsx]DA'!$C$1:$C$1000=B$1)*('C:\Files\[Worksheet.xlsx]DA'!$D$1:$D$1000=$A2)*('C:\Files\[Worksheet.xlsx]DA'!$H$1:$I$1000))

  7. #7
    Registered User
    Join Date
    02-17-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Simplify Long Formula

    Quote Originally Posted by Jonmo1 View Post
    The most effective way to make that calculate faster would be to NOT use entire column references like C:C
    Change the references to a meaningful range like C1:C1000

    You could also cut the 8 sumproducts down to 4 by combining the H and I columns into 1 sumproduct
    =SUMPRODUCT(('C:\Files\[Worksheet.xlsx]DA'!$C$1:$C$1000=B$1)*('C:\Files\[Worksheet.xlsx]DA'!$D$1:$D$1000=$A2)*('C:\Files\[Worksheet.xlsx]DA'!$H$1:$I$1000))
    I get a #VALUE! error when I enter that formula, but if I do this it works:

    =SUMPRODUCT(('C:\Files\[Worksheet.xlsx]DA'!$C$1:$C$1000=B$1)*('C:\Files\[Worksheet.xlsx]DA'!$D$1:$D$1000=$A2)*('C:\Files\[Worksheet.xlsx]DA'!$H$1:$H$1000))
    +SUMPRODUCT(('C:\Files\[Worksheet.xlsx]DA'!$C$1:$C$1000=B$1)*('C:\Files\[Worksheet.xlsx]DA'!$D$1:$D$1000=$A2)*('C:\Files\[Worksheet.xlsx]DA'!$I$1:$I$1000))

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Simplify Long Formula

    That makes no sense...
    If the formula I posted returns #Value! (probably because there is text in either column H or I)
    Then the one doing H & I seperately would as well.

    Notice the column references isn't the only thing I changed from your original..

    I also changed the last , to *(

  9. #9
    Registered User
    Join Date
    02-17-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Simplify Long Formula

    Yes, it works now! There was an instance of text in the FD Sheet where a number should have been, thats now sorted.

+ 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] Could anyone help me simplify a very long and drawn out process?
    By Unikron in forum Excel General
    Replies: 13
    Last Post: 11-15-2012, 01:02 PM
  2. Simplify Long Process Function
    By imav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2011, 02:05 PM
  3. Long long formula not calc'ing all steps
    By jvautour in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-01-2009, 10:26 AM
  4. Help Simplify Long Select Case with If/Then
    By garretonufer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2009, 11:57 AM
  5. how to simplify the long formula
    By set giron in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-25-2008, 08:03 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