+ Reply to Thread
Results 1 to 6 of 6

Need help with 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 help with formula for counting incidents with multiple criteria

    First let me say thanks in advance. I thought it was working correctly until this month.

    Example: K34 and L34 on the Cover tab are getting their numbers from column D on the 2014 tab. I need them to get their numbers from column A. I have tried changing D:D to A:A, that didn’t work.

    K34 should be 13 and L34 should be $1,145.75.

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

  2. #2
    Registered User
    Join Date
    07-04-2013
    Location
    Cornwall
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: Need help with formula for counting incidents with multiple criteria

    Looking at your spreadsheet, the formula in K34 sums the values in column F on the 2004 tab, where the month is December and the owner ID contains 0008 - is this correct?
    Filtering the data on the 2004 tab for the owner ID and month I only get one result - column A contains 8. Could you clarify where you are getting 13?

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

    Re: Need help with formula for counting incidents with multiple criteria

    It needs to look for store number in column A instead of looking for the owner ID containing 0008. If it would do that then it would count 13 incidents in column F with the store number of 8 in column A.

    I hope this helps clarify.

  4. #4
    Registered User
    Join Date
    07-04-2013
    Location
    Cornwall
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: Need help with formula for counting incidents with multiple criteria

    I managed to get this to work by changing the value in K3 from *00008 to 8, and the formulas to:

    =SUMIFS(INDIRECT(I$22&"!F:F"),INDIRECT(I$22&"!A:A"),Cover!$K$3,INDIRECT(I$22&"!E:E"),">="&IF(MONTH($D34)=1,DATE(I$22+1,1,1),DATE(I$22,MONTH($D34),1)),INDIRECT(I$22&"!E:E"),"<="&IF(MONTH($D34)=1,EOMONTH(DATE(I$22+1,1,1),0),EOMONTH(DATE(I$22,MONTH($D34),1),0)),INDIRECT(I$22&"!C:C"),"NON-ASSOCIATE THEFT")

    =SUMIFS(INDIRECT(I$22&"!G:G"),INDIRECT(I$22&"!A:A"),Cover!$K$3,INDIRECT(I$22&"!E:E"),">="&IF(MONTH($D34)=1,DATE(I$22+1,1,1),DATE(I$22,MONTH($D34),1)),INDIRECT(I$22&"!E:E"),"<="&IF(MONTH($D34)=1,EOMONTH(DATE(I$22+1,1,1),0),EOMONTH(DATE(I$22,MONTH($D34),1),0)),INDIRECT(I$22&"!C:C"),"NON-ASSOCIATE THEFT")

    in both cases, change !D:D to !A:A and remove the &"*" after Cover!$K$3

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

    Re: Need help with formula for counting incidents with multiple criteria

    Quote Originally Posted by SLWright View Post
    I managed to get this to work by changing the value in K3 from *00008 to 8, and the formulas to:

    =SUMIFS(INDIRECT(I$22&"!F:F"),INDIRECT(I$22&"!A:A"),Cover!$K$3,INDIRECT(I$22&"!E:E"),">="&IF(MONTH($D34)=1,DATE(I$22+1,1,1),DATE(I$22,MONTH($D34),1)),INDIRECT(I$22&"!E:E"),"<="&IF(MONTH($D34)=1,EOMONTH(DATE(I$22+1,1,1),0),EOMONTH(DATE(I$22,MONTH($D34),1),0)),INDIRECT(I$22&"!C:C"),"NON-ASSOCIATE THEFT")

    =SUMIFS(INDIRECT(I$22&"!G:G"),INDIRECT(I$22&"!A:A"),Cover!$K$3,INDIRECT(I$22&"!E:E"),">="&IF(MONTH($D34)=1,DATE(I$22+1,1,1),DATE(I$22,MONTH($D34),1)),INDIRECT(I$22&"!E:E"),"<="&IF(MONTH($D34)=1,EOMONTH(DATE(I$22+1,1,1),0),EOMONTH(DATE(I$22,MONTH($D34),1),0)),INDIRECT(I$22&"!C:C"),"NON-ASSOCIATE THEFT")

    in both cases, change !D:D to !A:A and remove the &"*" after Cover!$K$3
    Thank you very much. I will try this later today and post back.

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

    Re: Need help with formula for counting incidents with multiple criteria

    Quote Originally Posted by SLWright View Post
    I managed to get this to work by changing the value in K3 from *00008 to 8, and the formulas to:

    =SUMIFS(INDIRECT(I$22&"!F:F"),INDIRECT(I$22&"!A:A"),Cover!$K$3,INDIRECT(I$22&"!E:E"),">="&IF(MONTH($D34)=1,DATE(I$22+1,1,1),DATE(I$22,MONTH($D34),1)),INDIRECT(I$22&"!E:E"),"<="&IF(MONTH($D34)=1,EOMONTH(DATE(I$22+1,1,1),0),EOMONTH(DATE(I$22,MONTH($D34),1),0)),INDIRECT(I$22&"!C:C"),"NON-ASSOCIATE THEFT")

    =SUMIFS(INDIRECT(I$22&"!G:G"),INDIRECT(I$22&"!A:A"),Cover!$K$3,INDIRECT(I$22&"!E:E"),">="&IF(MONTH($D34)=1,DATE(I$22+1,1,1),DATE(I$22,MONTH($D34),1)),INDIRECT(I$22&"!E:E"),"<="&IF(MONTH($D34)=1,EOMONTH(DATE(I$22+1,1,1),0),EOMONTH(DATE(I$22,MONTH($D34),1),0)),INDIRECT(I$22&"!C:C"),"NON-ASSOCIATE THEFT")

    in both cases, change !D:D to !A:A and remove the &"*" after Cover!$K$3

    Works great slwright, thank you.

+ 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. Formula for Counting Multiple Ranges and Multiple Criteria
    By musicman1985 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-29-2014, 05:43 AM
  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. Replies: 12
    Last Post: 02-10-2014, 11:59 AM
  4. Replies: 0
    Last Post: 03-23-2011, 12:15 PM
  5. [SOLVED] Counting number of incidents of a month
    By CD Web in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-18-2005, 06:05 PM

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