+ Reply to Thread
Results 1 to 6 of 6

Help with countif?

  1. #1
    Registered User
    Join Date
    01-29-2015
    Location
    Essex
    MS-Off Ver
    2010
    Posts
    22

    Help with countif?

    Countif example.xlsx

    Hello
    Just wondering if someone can help me with the countif function?

    I have uploaded an example of my spreadsheet. I'm trying to copy the countif formula, but am having the following problems:

    As you can see, from C 50 (all the way down to C299) I need to input the countif function (it's covering/counting data from C2 - C46).
    However, when I drag the formula down, from C50, the range is changed. Is there a way to drag the countif formula down from C50-C299 without changing the range (the range still needs to be C2-C46)?

    Furthermore, as the formula is dragged down, I need the countif criteria to change. For example, C50 needs to be 1, C51 needs to be 2, and so on until number 250! Is there anyway this can be done other than manually changing each formula?

    I'm going to need to apply this to 30 participants (30 columns), so that's 7,500 times I'm going to be needing to use the countif formula!

    Thank you so much for any input!!

  2. #2
    Forum Contributor
    Join Date
    07-17-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel for O365
    Posts
    197

    Re: Help with countif?

    Hi Bee008,

    You just need to change the range to an absolute reference - that will stop it changing then.

    In cell C50, enter...

    =COUNTIF($C$2:$C$46,$A50)

  3. #3
    Registered User
    Join Date
    01-29-2015
    Location
    Essex
    MS-Off Ver
    2010
    Posts
    22

    Re: Help with countif?

    Ah brilliant, thank you - I didn't know such a thing existed (Excel newbie over here!!)

    Is there a way to get the criteria to change from 1 all the way down to 250 though? Other than manually entering it

  4. #4
    Forum Contributor
    Join Date
    07-17-2013
    Location
    Birmingham, England
    MS-Off Ver
    Excel for O365
    Posts
    197

    Re: Help with countif?

    Yes that formula will do that. Instead of having...

    =COUNTIF($C$2:$C$46,1)

    In this formula 1 is the criteria to look up, but in your work book, you have the numbers 1 - 250 in cells A50 onwards. So by tweaking the formula to...

    =COUNTIF($C$2:$C$46,$A50)

    A50 is now the criteria to look up - which in this case, contains 1 - when dragging down, this will change to be 2, 3, 4 and so on.

    Hope this helps.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Help with countif?

    when you enter a number in excel, if you enter the next in a sequence like 1 then 2, excel will auto fill if you just drag down (or across) as it sees a series.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  6. #6
    Registered User
    Join Date
    01-29-2015
    Location
    Essex
    MS-Off Ver
    2010
    Posts
    22

    Re: Help with countif?

    Quote Originally Posted by jwillis07 View Post
    Yes that formula will do that. Instead of having...

    =COUNTIF($C$2:$C$46,1)

    In this formula 1 is the criteria to look up, but in your work book, you have the numbers 1 - 250 in cells A50 onwards. So by tweaking the formula to...

    =COUNTIF($C$2:$C$46,$A50)

    A50 is now the criteria to look up - which in this case, contains 1 - when dragging down, this will change to be 2, 3, 4 and so on.

    Hope this helps.

    Perfect!


    Thank you very much jwillis07

+ 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. [SOLVED] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  2. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  3. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  4. COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  5. Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 PM

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