+ Reply to Thread
Results 1 to 3 of 3

Count values with multiple criteria

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    Iowa
    MS-Off Ver
    Excel 2007
    Posts
    84

    Count values with multiple criteria

    Hi all,

    I'm trying to formulate code that goes through a column and counts instances where the following three conditions are met:
    • age < 40
    • salary >= 10,000
    • salary <= 19,999

    Thanks.

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Count values with multiple criteria

    Are you wanting code, or a formula?
    you also mention you want to look at A column. would the Age and Salary not be in seperate columns?
    Assuming Age is in column A, and Salary is in column B, the formula below should work. You will need to change the cell references though.
    =COUNTIFS($A$1:$A$100,"<40",$B$1:$B$100,">=10000",$B$1:$B$100,"<=19999")
    Please click the * icon below if I have helped.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Count values with multiple criteria

    If the ages are in column A and the salaries are in column B the following will count the records that meet your criteria:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Change the cell references to match your data.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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