+ Reply to Thread
Results 1 to 5 of 5

Streamlining a formula

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    reading
    MS-Off Ver
    2010
    Posts
    32

    Streamlining a formula

    Below is a formula that is being used in a spreadsheet I have taken over in my new job:

    =IF(ISNA(SUM(VLOOKUP(A9,'BF ProjectBreakout'!A:O,7,0),(VLOOKUP(A9,'BF ProjectBreakout'!A:O,12,0)))),0,(SUM(VLOOKUP(A9,'BF ProjectBreakout'!A:O,7,0),(VLOOKUP(A9,'BF ProjectBreakout'!A:O,12,0)))))

    It is showing the total sum of specific departments, within a specific project - BF ProjectBreakout consists of the pivot table where the data comes from.

    I just wondered if there could be a better way to write this formula - perhaps incorporating 'MATCH' for the column names in case the number of columns moved each week?

    If anyone can help that would be great, or if more information is needed (which I am sure it will) let me know.
    Thanks
    Claire

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Streamlining a formula

    Step 1 (if your employer is using Excel version 2007+ and backward compatibility is not an issue) is to replace IF(ISNA()) so your current formula could be:

    =IFERROR(SUM(VLOOKUP(A9,'BF ProjectBreakout'!A:O,7,0),VLOOKUP(A9,'BF ProjectBreakout'!A:O,12,0)),0)

    anything further requires more info.
    Last edited by Cutter; 05-09-2012 at 12:26 PM.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,616

    Re: Streamlining a formula

    Does this help ?
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Streamlining a formula

    Or,

    =IFERROR(SUMPRODUCT(VLOOKUP(A9,'BF ProjectBreakout'!A:O,{7,12},0)),0)

    Or,

    Enter heading in A8 as same heading in column A of BF ProjectBreakout sheet, then use DSUM

    =SUM(DSUM('BF ProjectBreakout'!A:O,{7,12},A8:A9))
    Last edited by Haseeb Avarakkan; 05-09-2012 at 10:51 PM.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    05-09-2012
    Location
    reading
    MS-Off Ver
    2010
    Posts
    32

    Re: Streamlining a formula

    Here’s a little more information:

    Tab named ‘BF ProjectBreakout’ contains a pivot table showing how much time has been added to each project, within each department, for example:

    untitled.GIF

    On another tab I am trying to show what time has been burnt dependent on the project code (or number) and their department. HOWEVER, as an example, TEC and MOB are one overall department and JSX is another.

    As I have already shown, this is my original formula =IF(ISNA(SUM(VLOOKUP(A9,'BF ProjectBreakout'!A:O,7,0),(VLOOKUP(A9,'BF ProjectBreakout'!A:O,12,0)))),0,(SUM(VLOOKUP(A9,'BF ProjectBreakout'!A:O,7,0),(VLOOKUP(A9,'BF ProjectBreakout'!A:O,12,0))))) but this is only if the columns stay exactly the same each week, which may not be the case…

    So, could anyone suggest a slightly better formula, perhaps taking ‘match’ into account? Or would the ones suggested be the best…?

    Thanks!
    Claire

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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