+ Reply to Thread
Results 1 to 4 of 4

Need a wild card in a formula for counting incidents with multiple criteria

  1. #1
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Arkansas
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    252

    Need a wild card in a formula for counting incidents with multiple criteria

    Typing a store number in K3 will bring up the numbers for the store perfectly. I need to add a wild card so it will bring up all store numbers when asked. I have tried Cover!$K$3&”*” but that didn’t work.

    Hopefully this will be the last change that needs to be made for this workbook.

    I have attached what I am working on.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Need a wild card in a formula for counting incidents with multiple criteria

    You can only use a wildcard if you have text values. Try it like this in E7 (changes shown in red):

    =SUMIFS(INDIRECT(E$5&"!F:F"),INDIRECT(E$5&"!A:A"),IF($K$3="",">0",$K$3),INDIRECT(E$5&"!E:E"),">="&IF(MONTH($D7)=1,DATE(E$5+1,1,1),DATE(E$5,MONTH($D7),1)),INDIRECT(E$5&"!E:E"),"<="&IF(MONTH($D7)=1,EOMONTH(DATE(E$5+1,1,1),0),EOMONTH(DATE(E$5,MONTH($D7),1),0)),INDIRECT(E$5&"!C:C"),"ASSOCIATE THEFT")

    and similar for the other cells on that row, then copy down. Now if K3 is empty, then all stores will be included, but you could change it to IF($K$3="All" ... , so you would have to put the word All in K3.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Arkansas
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    252

    Re: Need a wild card in a formula for counting incidents with multiple criteria

    Quote Originally Posted by Pete_UK View Post
    You can only use a wildcard if you have text values. Try it like this in E7 (changes shown in red):

    =SUMIFS(INDIRECT(E$5&"!F:F"),INDIRECT(E$5&"!A:A"),IF($K$3="",">0",$K$3),INDIRECT(E$5&"!E:E"),">="&IF(MONTH($D7)=1,DATE(E$5+1,1,1),DATE(E$5,MONTH($D7),1)),INDIRECT(E$5&"!E:E"),"<="&IF(MONTH($D7)=1,EOMONTH(DATE(E$5+1,1,1),0),EOMONTH(DATE(E$5,MONTH($D7),1),0)),INDIRECT(E$5&"!C:C"),"ASSOCIATE THEFT")

    and similar for the other cells on that row, then copy down. Now if K3 is empty, then all stores will be included, but you could change it to IF($K$3="All" ... , so you would have to put the word All in K3.

    Hope this helps.

    Pete
    Thank you Pete, I went with the asterisk "*".

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need a wild card in a formula for counting incidents with multiple criteria

    Quote Originally Posted by Pete_UK View Post
    You can only use a wildcard if you have text values.
    This might have limited usefulness, but...

    A1 = 201

    =ISNUMBER(SEARCH("2?1",A1))

    Yet, something like these fail:

    =COUNTIF(A1,"2?1")

    =COUNTIF(A1,"2*1")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need help with formula for counting incidents with multiple criteria
    By jmcole in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-17-2014, 06:42 PM
  2. [SOLVED] Need help with formula for counting incidents with multiple criteria
    By jmcole in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 04-29-2014, 07:46 PM
  3. Max, Min, & Std Dev with Multiple Criteria Including a Wild Card
    By rmmohan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-14-2013, 12:45 PM
  4. Array Formula with Dynamic Wild Card Criteria
    By mildar in forum Excel General
    Replies: 8
    Last Post: 12-30-2010, 01:35 PM
  5. Counting Cells with multiple criteria.One criteria supporting wild
    By Azhar Saleem in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-12-2005, 07:06 AM

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