+ Reply to Thread
Results 1 to 17 of 17

sumproduct() and search()

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294

    sumproduct() and search()

    Hi,

    I'm having a problem with the formula listed below:

    =SUMIF((Weekly_Upload_Export_!AM:AM="DC By Pass")*(Weekly_Upload_Export_!AL:AL="*(Corporate)*")*Weekly_Upload_Export_!AE:AE)

    What I'm trying to do is sum Column AE if column AM = DC By Pass and Column AL has the text (Corporate) in the cell. I can't get it to work.

    Any thoughts.

    Thanks

    Eddie

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Following formula should do the job ...

    Please Login or Register  to view this content.
    HTH
    Carim
    Last edited by Carim; 11-28-2006 at 02:12 PM.

  3. #3
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Thank you so much for your quick reply.

    I can't get it to work. It is returning #NUM!

    Any ideas of what it is not working? This really seems easy to me but I can't get it to work.

    Thanks

    Eddie

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Well with sumproduct(), there are quite often several parameters to check ...

    Do you mind uploading a zipped copy of your spreadsheet, for a precise answer ...

    HTH
    Carim

  5. #5
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Yeah I will. I have to run to a meeting. I'll put it up when I get back.

    Thank you for your help.

    Eddie.

  6. #6
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    You can't use whole column references in Sumproduct...

  7. #7
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Richard,

    You are right ... copied formula in a hurry without even noticing it ...!!!

    Cheers
    Carim

  8. #8
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Thanks. We are getting closer. Here is the formula that I have on the sheet now:

    =SUMPRODUCT(--(Weekly_Upload_Export_!AM2:AM65536="DC By Pass")*--(Weekly_Upload_Export_!AL2:AL65536="*(Corporate)*")--(Weekly_Upload_Export_!AE2:AE65536))

    It seems to be adding the totals of AM and AL if they have. I only want them to sum if AM has DC by pass and AL has corporate.

    Thank you

    Eddie.

  9. #9
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    I meant to put this in the post above. AL should sum if the text corporate is in the cell. That is why I have wildcard things around it.

    Thanks

  10. #10
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi Eddie,

    Is the word "Corporate" anywhere in the cell ... or always located in the same position ... ?
    You could use the Search() function ...

    HTH
    Carim

  11. #11
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    ... which would mean using following expression ...


    *--(NOT(ISERROR(SEARCH("Corporate",Weekly_Upload_Export_!AL2:AL65536))))

    HTH
    Carim
    Last edited by Carim; 11-28-2006 at 04:15 PM.

  12. #12
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Here is a copy of the file. There is usually a lot more data but I had to throw most of it out to get it to attach.

    The formula should go in B9 of the summary tab.

    Thank you for your help.

    Eddie.
    Attached Files Attached Files

  13. #13
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi Eddie,

    Glad you posted a sample worksheet, it makes life a lot easier ...

    Attached is your tailor-made sumproduct() formula ...

    HTH
    Carim
    Attached Files Attached Files

  14. #14
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Glad your problem is fixed.

    Carim

  15. #15
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    I have faith you got it to work. I just haven't had a chance to check it out test it yet. Thank you so much for your help. You should have some feedback in a little while.

    Eddie.

  16. #16
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    That worked great. Thank you so very much.

    Eddie.

  17. #17
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Glad your problem is now totally fixed.

    Thanks a lot for the feedback

    Carim

+ 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