+ Reply to Thread
Results 1 to 6 of 6

Shortening a Formula

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    Bracknell
    MS-Off Ver
    Excel 2010
    Posts
    86

    Shortening a Formula

    Good Day,

    I was wondering if there is a way to shorten the below formula - I cannot believe that there is not so was wondering if someone can please help me out before I drive myself batty!

    The formula, as can be seen in the attachment is basically the same thing just repeated over and over with the one exception being that there is a difference in each one of a different status being shown; ie: Service Complete; Service Incomplete; 1st Level Invoice Approval; Pend; etc.

    Is there an easier way or am I stuck with this?

    Much appreciated
    Andrew
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Shortening a Formula

    There are three easiest ways to do it (you probably have headers in row1, don't you?):
    1) DSUM formula
    2) Using autofilter and then SUBTOTAL formula
    3) Pivot Table based on your data

    The more tough way would be using SUMPRODUCT function, and (aspecially if you have large dataset - could be quite slow).
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    Bracknell
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: Shortening a Formula

    Hi Kaper,

    I am not sure that this will work for me. The formulas are in a completely different worksheet. They are there to look at the data and then bring back certain bits of information. This is not the only formula but it is the longest and so I was just looking for a way to simplify what I had. Is this possible?

  4. #4
    Registered User
    Join Date
    01-15-2013
    Location
    Bracknell
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: Shortening a Formula

    Basically within the formula everything is the same and is repeated over and over again except for the 1 measure as mentioned above.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Shortening a Formula

    Hi,

    Yes - you can shorten this formula:

    =SUM(SUMIFS('Data - CURRENT'!X:X, 'Data - CURRENT'!G:G, {"Service Complete","Service Incomplete","1st Level Invoice Approval","Pend","Assigned","Pend Site Review","Accounting Review","Bill Payment Pend.","In Progress","Invoice Processed","Paid Not Invoiced"}, 'Data - CURRENT'!E:E, "Area 01", 'Data - CURRENT'!I:I, "Building Repairs"))

    However, even better would be to store the column G variables somewhere else and store that as a Named Range. For example, if E16:E26 housed these 11 possibilities, and you were to go to Name Manager and define a new name, ColG_Values say, as:

    =$E$16:$E$26

    your formula would then become simply:

    =SUMPRODUCT(SUMIFS('Data - CURRENT'!X:X, 'Data - CURRENT'!G:G, ColG_Values, 'Data - CURRENT'!E:E, "Area 01", 'Data - CURRENT'!I:I, "Building Repairs"))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Registered User
    Join Date
    01-15-2013
    Location
    Bracknell
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: Shortening a Formula

    Oh yes - that is perfect!!! Brilliant. Thank you so much XOR LX

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Shortening a Formula

    You're welcome!

+ 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. Please help shortening this formula!!
    By chivalry2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2013, 08:08 AM
  2. shortening a formula
    By reetu in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-12-2011, 03:33 PM
  3. Shortening of a Big Formula
    By nanocrazy in forum Excel General
    Replies: 3
    Last Post: 03-30-2009, 12:59 AM
  4. [SOLVED] Shortening a formula
    By GTVT06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-19-2006, 09:50 PM
  5. [SOLVED] Shortening a formula
    By GTVT06 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-19-2006, 06:25 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