Forum Discussion

bbsin's avatar
bbsin
Iron Contributor
Apr 18, 2023

countifs - range and match criteria - please advise.

hi 

 

I like to find out the range of the Age that matches the category, can advise how to use the formulas for especial age 40 to 60 to match the category to count it how many that fall within.

 

Thank you

 

 Col ABcDEF
1 TeachLearnStaffAdminCleaner
2age     
3<40     
440 to 60     
5>60     
  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    bbsin 

    To count the number of values that fall within a specific age range and match a certain category using the COUNTIFS function in Excel, you need to specify both the age range and the category as criteria.

    Assuming that your data is organized in a table with column A containing the ages and column B containing the categories, you can use a formula like this to count the number of values where the age is between 40 and 60 and the category is “Teach”:

    =COUNTIFS(A:A,">=40",A:A,"<=60",B:B,"Teach")

    This formula uses two criteria for the age range: ">=40" to include ages greater than or equal to 40 and "<=60" to include ages less than or equal to 60.

    The third criterion specifies that the category in column B must be “Teach”.

    You can adjust this formula to suit your specific needs by changing the range references and criteria. 

     

    If this is not what you are looking for, I recommend that you provide more information so that we can give you a more specific answer.

    Here is a link to it: Welcome to your Excel discussion space!

     

    Hope its helps!

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi bbsin 

     

    #1 Could you clarify what you expect with an example please?

    #2 Version of Excel + Operating System (Mac, Windows...)?

Resources