SUMIF - restricted

  • Feel a bit stooopid asking this (as most of you know I only answer....)


    I've seen examples in the past but I can't find anything when I need it...


    Say I have a worksheet called "DATA" with 2 columns A & B
    In Column B I have numbers I wish to sum.
    In Column A I have a string of variable length...


    eg


    abcde
    abc
    abx
    abf


    Now let's say on another sheet called "CALCS" I also have 2 columns A & B


    in A I have
    abc
    abx
    abf


    in Col B i want a sumif that sums "DATA" Column B where "DATA" Left(Column A,3) = abc - ie I only want to test against left 3 characters.... or more specifically "abc" (could be "ab" for arguments sake) ... how do I do that?


    Ta

  • Re: SUMIF - restricted


    Quote from lasw10

    ah, ok, no way of doing this without using SUMPRODUCT?


    Try...


    =SUMIF(A1:A10,"abc*",B1:B10)


    or


    =SUMIF(A1:A10,D1&"*",B1:B10)


    ...where D1 contains your criterion, such as 'abc'.


    Hope this helps!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!