+ Reply to Thread
Results 1 to 5 of 5

COUNTIF Help

  1. #1
    Registered User
    Join Date
    03-20-2012
    Location
    Location, Location
    MS-Off Ver
    Excel 2007
    Posts
    2

    COUNTIF Help

    I need some help on how to change the scope of what COUNTIF is counting. I am trying to set COUNTIF to count the entire column of only a table. The problem with it is that the table is never a set size sometimes it will have 10 entries and sometimes the table will have 50 entries. So my question is, how do I increase COUNTIF's range as more records are added to the table?

  2. #2
    Forum Contributor bentleybob's Avatar
    Join Date
    02-27-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    644

    Re: COUNTIF Help

    Can we assume that there's other information in the column that you don't want included?

    One option would be to use a dynamic range name for your table.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: COUNTIF Help

    Hi and welcome to the forum.

    You mean something like this??

    =COUNTIF(A:A,"=1")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: COUNTIF Help

    You could use a dynamic range within COUNTIF, e.g. if your table starts at C2 and entries are consecutive without blanks then you can define a range, e.g. Data - right-click and use "Name a Range" then use this formula in refers to:

    =$C$2:INDEX($C$2:$C$1000,COUNTA($C$2:$C$1000))

    that assumes you will never have more than 1000 rows, now use

    =COUNTIF(Data,"x")

    or similar
    Audere est facere

  5. #5
    Registered User
    Join Date
    03-20-2012
    Location
    Location, Location
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: COUNTIF Help

    Unfortunately I cant assume that nothing else will be put into that row, all i can do for the time being is make it dynamic and be sure to tell everyone not to use the E column for anything but that purpose. Thank you all very much for the help and the quick responses!!!
    Last edited by jwconklin89; 03-20-2012 at 02:56 PM.

+ 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