+ Reply to Thread
Results 1 to 7 of 7

Look for formula to subtract columns based on another columns Value

  1. #1
    Registered User
    Join Date
    05-26-2022
    Location
    Ontario
    MS-Off Ver
    2012
    Posts
    3

    Look for formula to subtract columns based on another columns Value

    I am currently using Version 2012 (Build 13530.20376).

    I am looking to see if I can put a formula into column I.

    When column D has the same values it subtracts the sum of H for those rows from the value of column F.

    Would anyone be able to assist with this formula? I attached a picture below to illustrate.

    Capture.PNG

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Look for formula to subtract columns based on another columns Value

    IF

    IF(Logic,True,False)

    Logic = D133="Example 1"
    True = F133-H133
    False = ? What do you want to happen, keep all of F... then F133

    However - how does it know it know "Same Values" are you saying if it has more than 1, then take quantity - received?

    Logic would need to be Countifs(D:D,D133)>1
    Which is to say if this Probill exists more than just now, move to TRUE otherwise move to FALSE

    If everything is assumed correctly... this should go into I133
    Please Login or Register  to view this content.
    -If you think you are done, Start over - ELeGault

  3. #3
    Registered User
    Join Date
    05-26-2022
    Location
    Ontario
    MS-Off Ver
    2012
    Posts
    3

    Re: Look for formula to subtract columns based on another columns Value

    This is close to what I need. However if you look at the picture below, I would want the value of column I to show 0 as column H in rows 179 and 181 would account for the 3 in column F

    Attachment 781865

  4. #4
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Look for formula to subtract columns based on another columns Value

    Image did not come through...

    But what you are describing is that H contains a 3 as does F?

    The formula previously provided should do this UNLESS, this is not a "Multiple" entry based on that Probill ID...

    If there is no difference between the operation of when there is multiples and is not... would not simply saying F - H = I?

  5. #5
    Registered User
    Join Date
    05-26-2022
    Location
    Ontario
    MS-Off Ver
    2012
    Posts
    3

    Re: Look for formula to subtract columns based on another columns Value

    I will have multiple entries for my probills.

    Column F is the total amount of pieces on my probill, and Column H is what I have received.

    When I have multiple entries of the same probill I want the sum of the amount received to be subtracted from the total so column I shows the remaining.

    See below picture for what I would be looking for
    Capture3.JPG

  6. #6
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Look for formula to subtract columns based on another columns Value

    So Column I should be a floating summary (Running Total of Remaining)

    In that case this changes the structure.

    This says give me the Total Quantity Up through current row - Total Quantity Received up through current row.
    Please Login or Register  to view this content.
    Now, is your Quantity repeated always (Appears to be) but is it the same value throughout the document...

    Example 1 every time it appears will ALWAYS have 5? or is that subject to change through time?

    If it is always the same and we are trying to say what do they have left...

    In that case, lets get the MAX quantity issued minus running total of received
    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Look for formula to subtract columns based on another columns Value

    We can also say get the MAX ever issued up till NOW (Current Row) and remove what has been issued up till now... this way if that 5 for Example 1 changes to 6 40 records later, it will add the 1 to the issued when the time comes
    =MAXIFS($F$3:$F3,$D$3:$D3,$D3)-SUMIFS($H$3:$H3,$D$3:$D3,$D3)

+ 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. Formula to sum and subtract two columns in power query
    By sunboy in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-27-2021, 01:12 AM
  2. Formula to subtract from fixed amount over multiple columns
    By jwagri in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2017, 10:51 AM
  3. [SOLVED] subtract values based on other columns
    By keywestsue in forum Excel General
    Replies: 3
    Last Post: 03-21-2017, 12:55 PM
  4. Insert Subtract formula in specific columns with VBA
    By laansesu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2016, 07:12 AM
  5. Replies: 6
    Last Post: 02-03-2014, 05:57 PM
  6. Replies: 2
    Last Post: 08-13-2013, 09:36 AM
  7. [SOLVED] making a formula to subtract two figures, but only if there is data in both columns
    By bite_tony in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 01:13 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