+ Reply to Thread
Results 1 to 7 of 7

countifs not working with cell reference

  1. #1
    Registered User
    Join Date
    05-26-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    36

    countifs not working with cell reference

    Hi

    I am trying to count the number of rows which match a certain criteria.

    i wanted to use =COUNTIFS(Schedule!$A$2:$A$50000,">C2",Schedule!$B$2:$B$50000,"=A320",Schedule!$C$2:$C$50000,"=LGW")

    ">C2" refers to a date within the sheet

    the formula works if i replace the C2 with a written date i.e. 05/01/2013

    what am i doing wrong here, does COUNTIFS only work with specific text fields entered within "".


    whats the alternative?


    many thanks

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: countifs not working with cell reference

    =COUNTIFS(Schedule!$A$2:$A$50000,">"&C2,Schedule!$B$2:$B$50000,A320,Schedule!$C$2:$C$50000,"LGW")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: countifs not working with cell reference

    Try

    =COUNTIFS(Schedule!$A$2:$A$50000,">"&C2,Schedule!$B$2:$B$50000,"A320",Schedule!$C$2:$C$50000,"LGW")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

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

    Re: countifs not working with cell reference

    Try it like this:

    =COUNTIFS(Schedule!$A$2:$A$50000,">"&C2,Schedule!$B$2:$B$50000,A320,Schedule!$C$2:$C$50000,"LGW")

    Hope this helps.

    Pete

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: countifs not working with cell reference

    is "A320" a cell or a value if its a value "A320" ifits a cell a320

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: countifs not working with cell reference

    and the rest of you were too slow lol

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

    Re: countifs not working with cell reference

    Ah well, we did add a bit of text in addition to the formula !!

    Pete

+ 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. relative cell reference not working
    By c.vaibhav in forum Excel General
    Replies: 8
    Last Post: 09-03-2013, 10:22 AM
  2. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  3. Countifs to get criteria from a cell reference
    By SeanKosmann in forum Excel General
    Replies: 2
    Last Post: 01-27-2011, 11:00 AM
  4. COUNTIFS not working
    By nosenga in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2011, 04:38 AM
  5. COUNTIFS function not working
    By d_mack in forum Excel General
    Replies: 3
    Last Post: 08-26-2010, 02:25 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