+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Conditional Addition

  1. #1
    Registered User
    Join Date
    06-27-2007
    Posts
    23

    Question Conditional Addition

    I have two columns; we will say they are columns “A” & “B”. Both columns contain dollar amounts. I need to sum up all of the cells in column A but only if their adjacent cells in column B contain a certain character, in this case it is a “0” or in accounting terms (-). I need to repeat this conditional formatting but this time sum up all of the cells in column A only if their adjacent cells in column B match. What is the best method to accomplish this?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You should be able to use SUMIF for the first, e.g.

    =SUMIF(A:A,0,B:B)

    For the second try

    =SUMPRODUCT(--(A1:A100=B1:B100),A1:A100)

    Note the first formula allows you to refer to the whole column, the second doesn't

  3. #3
    Registered User
    Join Date
    06-27-2007
    Posts
    23
    When I use your first formula, I get $0.00 dollars, which is not correct. Please refer to the screenshot for the following. Take H785 & I785 the amount is $3.32 in column H but $0.00 in column I, therefore I would like to add $3.32 to H787 ($268.00) because H787's corresponding cell (I787) is also $0.00 and so on... I just need to add PO's that have not been paid for which is the $0.00 amount in column I

    Thanks for your help!
    Attached Images Attached Images

  4. #4
    Forum Contributor
    Join Date
    05-21-2004
    Location
    UK
    Posts
    136
    The formula given should do it, adjusted to your columns

    =SUMIF(H:H,0,I:I)

  5. #5
    Registered User
    Join Date
    06-27-2007
    Posts
    23
    Do you know why I get $0.00 then...something has to be wrong. Here is my equation: =SUMIF(H3:H848,0,I3:I848)

  6. #6
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    From your initial description, it sounds like you need to change the formula to =SUMIF(I3:I848,0,H3:H848).

+ 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. Excel 2007 : Conditional Formatting drag
    By Scott27 in forum Excel General
    Replies: 3
    Last Post: 04-25-2013, 09:15 AM
  2. Conditional formatting with VB
    By crizzle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-30-2008, 01:26 PM
  3. Excel 2007 conditional formatting bug
    By jmessina in forum Excel General
    Replies: 0
    Last Post: 04-28-2008, 09:09 AM
  4. Find empty/null/blank cell in a conditional format
    By Dabooj in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-09-2008, 10:50 AM
  5. Conditional formatting macro (highlight macro)
    By c991257 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2007, 02:46 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