+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : COUNTIFS - criteria referencing a value in another cell

  1. #1
    Registered User
    Join Date
    11-12-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    COUNTIFS - criteria referencing a value in another cell

    Hi All,

    Hope someone can help me out. Currently using Excel 2007 and the countifs function.

    I have data in 2 worksheets within a workbook.

    First worksheet called Tables
    Second worksheet called Raw Data

    In raw data, i have 1500+ rows of data.
    Column C has country locations
    Column P has numerical value (days work has sat with division). Always positive.

    In Tables, I have a list of each possible country in Column A
    In column D, i would like to run the following report with countifs:

    First criteria - Look for all rows in Raw Data that match the country name in Column A of Tables

    Second Criteria - Look for all values that are greater than 10 in Column P.

    The formula looks like this

    =COUNTIFS('Raw data'!C:C,A4,'Raw data'!P:P,">10")

    I have that working without a problem.

    PROBLEM / QUESTION
    Instead of using >10 as the second criteria, i would like to use >K3 being a cell reference. That way, if we change the criteria level, we dont need to change the formulas.

    Unfortunately, when i simply insert >K3, it returns a nill value. If i insert >k3 and delete the inverted commas, then it comes up with a formula error.

    Am trying to make the spreadsheet as simple to use as possible for non-excel people so they can just change one cell value without updating formula.

    Appreciate any and all help!

    Thanks
    Last edited by stafa; 11-12-2009 at 10:31 PM.

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

    Re: COUNTIFS - criteria referencing a value in another cell

    Try

    =COUNTIFS('Raw data'!C:C,A4,'Raw data'!P:P,">"&K3)
    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
    11-12-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: COUNTIFS - criteria referencing a value in another cell

    Brilliant! Never considered that.

    Thanks for the help from first time forum user!!!

+ 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