+ Reply to Thread
Results 1 to 10 of 10

SUMPRODUCT Or SUMIF - In case of Case sensitive???

  1. #1
    Forum Contributor lifeisaspreadsheet's Avatar
    Join Date
    10-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    208

    SUMPRODUCT Or SUMIF - In case of Case sensitive???

    I need some assistance on calculating the SUM in Column F if the Products in cells B2 to B10000 are case sensitive.

    In other words, Column B has products GingerA and Gingera, while column F has the quantity. The 2 products are actually different and so I want to sum them seprately. I'm not suer how to do this, and if I could use EXACT with a sumif or sumproduct to do this...

    My current formula is: =IF(B2=B3,"",SUMIF($B$2:$B$10000,B2,$F$2:$F$10000))

    Please help!

    Thanks in advance!
    Experience is not what happens to you; it's what you do with what happens to you.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    I'm sure there are other ways.

    =SUMPRODUCT(--(EXACT($B$2:$B$10000,B2)),$F$2:$F$10000)

  3. #3
    Forum Contributor lifeisaspreadsheet's Avatar
    Join Date
    10-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    208

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    Thank you for a quick reply

    Somehow, this is not throwing back any values...all "0" only.

    My data is not in chrno order and has alpha numeric values will that matter?

    Also what about the IF condition in my previous formula, will that become redunant?

    =IF(B2=B3,""...

    Please advise...

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    Array formula
    =SUM(IF(ISERR(FIND("Gingera",$B$2:$B$10000,1)),0,$F$2:$F$10000))

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    life

    Can you attach a sample workbook?

    I don't think the IF would be redundant but then I don't know exactly what it does.

  6. #6
    Forum Contributor lifeisaspreadsheet's Avatar
    Join Date
    10-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    208

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    Thanks again!

    I'm not at my system, but my mind is still there...I'll try to explain (if it doesn't help, will upload a file asap).

    Basically, I'm sorting the data using the product names in column B and, then using =if(B2=B3,"",sumif(....))

    So the IF is being used to test if B2=B3, my guess with the array would be that it is no longer required including the sorting of the data. Correct?

    Also, I came across a weired scenario when I sorted my data to check against the already done piece (manual) the sorting when tested with the exact function returned "false". I manually ran through the data and found all the products were present but somehow, mine returned GingerA in B76 andd Gingera in B77, but then on sorting the manual version of the data it returned Gingera in B76 and GingerA in B77.

    I'm not sure if am missing a trick here or if the excel is miss-behaving

    Please advise...
    Last edited by lifeisaspreadsheet; 10-27-2012 at 03:46 PM.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    =SUMPRODUCT(--(ISNUMBER(FIND(D2,$B$2:$B$1000))),$F$2:$F$1000) where d2 holds gingerA
    or
    =SUMPRODUCT(--(ISNUMBER(FIND("GingerA",$B$2:$B$1000))),$F$2:$F$1000)
    FIND() is case sensitive
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Contributor lifeisaspreadsheet's Avatar
    Join Date
    10-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    208

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    Thanks a bunch Martin! It worked perfectly!

    Cheers!
    Last edited by Cutter; 10-28-2012 at 12:46 PM. Reason: Removed whole post quote

  9. #9
    Forum Contributor lifeisaspreadsheet's Avatar
    Join Date
    10-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    208

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    Thanks Norie for all your help. IT worked:-). You guys are just magical
    Last edited by Cutter; 10-28-2012 at 12:47 PM. Reason: Removed whole post quote

  10. #10
    Forum Contributor lifeisaspreadsheet's Avatar
    Join Date
    10-04-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    208

    Re: SUMPRODUCT Or SUMIF - In case of Case sensitive???

    @ eisayew

    Thanks. I'm sorted on this one. You guys rock!!!
    Last edited by Cutter; 10-28-2012 at 12:47 PM. Reason: Removed whole post quote

+ 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