Consulting

Results 1 to 3 of 3

Thread: Solved: Sumif with concatenate and wildcard

  1. #1
    VBAX Regular
    Joined
    Apr 2005
    Posts
    31
    Location

    Solved: Sumif with concatenate and wildcard

    Hello all,

    Need help with counting and suming

    I understand this part:
    =COUNTIF(List!$L:$L,"*"&$A2&"*")
    This uses a CONCATENATE and wildcard. It works very well

    I also undersatnd this part:
    {=SUM(IF(List!E1:E1500=$B1,1))}
    This will count full matching text

    This even works well if I want to count 2 criterias:
    {=SUM(IF((List!L1:L1500=A2)*(List!E1:E1500=B1),1))}

    But can I do something like this; count a full text and the other with a CONCATENATE and wildcard?
    {=SUM(IF((List!L1:L1500="*"&$A2&"*")*(List!E1:E1500=B1),1))}
    This does not work at all!

    How could I make this work?
    Thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =SUMPRODUCT(--(ISNUMBER(FIND(A2,List!L1:L1500))),--(List!E1:E1500=B1))

    if you want it to be case-sensitive,

    =SUMPRODUCT(--(ISNUMBER(SEARCH(A2,List!L1:L1500))),--(List!E1:E1500=B1))

    if not
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Apr 2005
    Posts
    31
    Location
    As usual XID, you've helped me once again.

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •