+ Reply to Thread
Results 1 to 2 of 2

Help with adding to a formula

  1. #1
    KimberlyC
    Guest

    Help with adding to a formula

    Hi,
    I'm using the following formula to add the totals in cell O10:O32 if the
    data (which is a 4 digit code) entered in cell P12 matches any of the the
    codes entered in cells A10:A32. If no match..then the answer is blank...or
    if no total is in O12 then the answer is blank.
    =IF(O12="","",(SUMIF($A$10:$A$32,P12,$O$10:$O$32)))
    For Example:
    Col A Col O Col P
    Col Q
    (Codes) (totals) (Summary of Codes from A)
    (This col with the formula in it..and answers are

    1234 1000.00 1234
    1000.00
    1235 2000.00 1235
    5000.00
    1235 3000.00 3200
    500.00
    3200 500.00

    This is working great!

    Here's where I need help:

    I've added a new column that I need to factor into the formula and I'm not
    sure how to do it..
    The column is B ....which could have an X entered by the codes in A or not.
    If there is an X entered in column B -- then.... I need the formula to look
    at P12 to see what the code is...and see if there are any matching ones in
    Cells A10:A32.. if it finds matching codes..then it needs to look at cells
    B10:B32 and if any of the matching codes have an X next to them...then the
    formula will not include that code's total in it's calculation...... see
    below:

    Col A Col B Col O Col P
    Col Q
    (Codes) (exclude) (totals) (Summary of Codes from A)
    (This col has the formula in it..and answers are

    1234 1000.00 1234
    1000.00
    1235 x 2000.00 1235
    3000.00
    1235 3000.00 3200
    500.00
    3200 500.00

    There are two entries for code 1235 in col A..but one has an X in col B next
    to it..so the total in Col Q for the code listed in Col P...doesn't included
    that total of 2000.00 for code 1235.

    Any help to accomplish this would be greatly apprecaited!
    Thanks in advance
    Kimberly







  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    =IF(O12="","",SUMproduct(($A$10:$A$32=P12)*($b$10:$b$32<>"X")*($O$10:$O$32)))

    adds column o for column a match to cell p12, and no x in column b
    not a professional, just trying to assist.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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