+ Reply to Thread
Results 1 to 6 of 6

Please Help with an IF function!!!

  1. #1
    Registered User
    Join Date
    02-18-2005
    Posts
    7

    Arrow Please Help with an IF function!!!

    Anyone got any suggestions??? I'm trying to get the cells listed below to search Row 1 for the charge number, when they match the cell should sum the $ amount from the corresponding cell in Row 2. Formula needs to be flexible for new columns....Can anyone help?


    0001 - (subc) 0
    0002 - (Labc) 7
    0003 - (subc) 25
    0004 - (labc) -1
    -----------
    31







    Row1 charge number: 001 002 003 003 004 003 003 004

    Row 2 In cost: $0 $7 $1 $24 $-1

  2. #2
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    Try this:

    =SUMPRODUCT((A1:A32="003")*(C1:C32))

    Ola Sandstrom


    Note:
    The formula will take each row and compare it with - in this case - "003". If it is True (which is equal to 1. False=0) multiply that with whatever is in the corresponding row in column C.

    In you example:
    "001"="003"-->False. False*0=0
    "002"="003"-->False. False*7=0
    "003"="003"-->True. True*25=25
    ...
    ---------------------------------------------
    =SUMPRODUCT(0+0+25+...)

  3. #3
    Registered User
    Join Date
    02-18-2005
    Posts
    7

    Re:

    Thanks Ola -

    But it doesn't add up for me? That formula just gives me a sum of "0" zero each time and I would like for it to calculate the total $amount. I'm looking for a formula that will look and match the charge number in (D:10:AB10) and add the $amount for each in (D11:AB11)...????





    Quote Originally Posted by olasa
    Try this:

    =SUMPRODUCT((A1:A32="003")*(C1:C32))

    Ola Sandstrom


    Note:
    The formula will take each row and compare it with - in this case - "003". If it is True (which is equal to 1. False=0) multiply that with whatever is in the corresponding row in column C.

    In you example:
    "001"="003"-->False. False*0=0
    "002"="003"-->False. False*7=0
    "003"="003"-->True. True*25=25
    ...
    ---------------------------------------------
    =SUMPRODUCT(0+0+25+...)

  4. #4
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    How about
    =SUMPRODUCT((D10:AB10="003")*(D11:AB11))

    Ola

  5. #5
    Registered User
    Join Date
    02-18-2005
    Posts
    7

    Re:

    Hi ola...

    Thanks, but still getting zero as the amounts... Here is what the sheet looks like ((attached))....

    Would like to get the formula to match each individual charge # as indicated below and sum up the total $amounts for each....????
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    This is how it looks like for me:
    Ola
    Attached Files Attached Files

+ 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