+ Reply to Thread
Results 1 to 4 of 4

sumif with mid as criteria

  1. #1
    Registered User
    Join Date
    07-14-2012
    Location
    Walkerton, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    29

    sumif with mid as criteria

    Seems this should be simple but I'm stumped. Can't we use the "mid" function with an array within a sumif?

    This criteria is testing a range matching the mid text against a static cell with text.

    =SUMIF(Apr12!$E$8:$H$35,MID(Apr12!E8:E35,12,6)=Query!$A$5,Apr12!$H$8:$H$35)

    forum copy.xls

    Copy of test file is attached.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumif with mid as criteria

    Try:

    =SUMIF(Apr12!$E$8:$E$35,"*"&Query!$A$5&"*",Apr12!$H$8:$H$35)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-14-2012
    Location
    Walkerton, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: sumif with mid as criteria

    Ok smarty pants - that works...so it looks like you don't need to specify the range your searching through in the criteria portion, I thought you did.

    Thanks a bunch!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumif with mid as criteria

    No the asterisks serve as wildcards. Meaning to search for cells that contain your criteria.

+ 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