+ Reply to Thread
Results 1 to 3 of 3

Subtotal while Incorporating IF function Formula

  1. #1
    Registered User
    Join Date
    11-19-2012
    Location
    Oklahoma City, OK
    MS-Off Ver
    Excel 2007
    Posts
    6

    Subtotal while Incorporating IF function Formula

    All,

    Thank you in advance for your help!

    I have two columns. One is called ‘Total Line Amount Paid’ (AB) and the other called ‘PO Ext Price’ (X). I want to subtotal all of column AB and include an IF function with it. For instance, if AB=0, then add X, otherwise add AB. I'm using subtotal because I'm using a filter and only want to sum the visible cells.

    Here's my start with both formulas. How do I incorporate them? The formula will be on a different tab called Template. The Excel data where the data comes from is called Detail Orders (which will be filtered).

    =SUBTOTAL(9,'Detail Orders'!AB:AB)
    =IF('Detail Orders'!AB:AB=0,'Detail Orders'!X:X,'Detail Orders'!AB:AB)

    Please let me know if I need to explain it better. Thanks again.

    mbnewton1

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Subtotal while Incorporating IF function Formula

    Assuming data in rows 2 to 1000 try this formula

    =SUBTOTAL(9,'Detail Orders'!AB2:AB1000)+SUMPRODUCT(SUBTOTAL(9,OFFSET('Detail Orders'!X2,ROW('Detail Orders'!X2:X1000)-ROW('Detail Orders'!X2),0)),('Detail Orders'!AB2:AB1000=0)+0)
    Audere est facere

  3. #3
    Registered User
    Join Date
    11-19-2012
    Location
    Oklahoma City, OK
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Subtotal while Incorporating IF function Formula

    daddylonglegs!

    Thanks so much for your help! This formula works perfectly. However, I ran into one more pothole, if you have time or someone else has the time to help me. The is one more column I need incorporated into the formula.

    Can this also be incorporated into the formula above somehow?

    I have THREE columns. One is called ‘Total Line Amount Paid’ (AB), the other called ‘PO Ext Price’ (X), and the third is called 'Est Ext Price' (R). I want to subtotal all of column AB and include an IF function with it. For instance, if AB=0, then add X, otherwise add AB. HERE's THE ADDITION I'M REQUESTING TO THE FORMULA PROVIDED DADDYLONGLEGS. IF cells AB as well as X = 0, then add R, otherwise add AB. I'm using subtotal because I'm using a filter and only want to sum the visible cells.

    Please assist. Thanks again! This is the last portion that I'm trying to figure out.

    mbnewton1

+ 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