+ Reply to Thread
Results 1 to 7 of 7

COUNTIF: drag to change criteria, NOT range

  1. #1
    jcmorang
    Guest

    COUNTIF: drag to change criteria, NOT range

    Hello,

    I'm hoping that there's someone out there that can help with this
    problem.

    I'm trying to count values in one column so that I have an amount of
    each for a distribution. For example:

    8
    8
    8
    11
    11
    11
    12
    12
    12

    I'm using COUNTIF because it's the only one that seems to work, but
    whenever I drag to fill the series Excel doesn't fill in a linear
    fashion. Instead it repeats the formulas I've already entered. Here's
    an example of what I enter into the cells:

    =COUNTIF($A$2:$A$36,8)
    =COUNTIF($A$2:$A$36,9)
    =COUNTIF($A$2:$A$36,10)

    ....and so on.

    When I highlight these and drag, the sequence is repeated, not
    continued to 11, 12, 13 and so on.

    FYI, if I don't use the $ sign Excel will change the range from A2 to
    A3, A4, A5...as I drag.

    I want the criteria to continue (i.e. 8, 9, 10, 11, 12...), not the
    range and I don't want it to repeat formulas!

    PLEASE HELP!!!!!

    Thank you,
    Jeff


  2. #2
    Pete_UK
    Guest

    Re: COUNTIF: drag to change criteria, NOT range

    One way to do this is to fill a range with the values you want to count
    on, e.g. fill cells F1 to F10 with the values 8, 9, 10, 11, 12, 13, 14,
    15, 16, 17. Then your COUNTIF( ) formula can refer to these cells, i.e.

    =COUNTIF($A$2:$A$36,F1)

    Now when you copy this down you want F1 to change to F2, F3 etc., and
    another advantage is that you can change your data without having to
    change the formula.

    Hope this helps.

    Pete


  3. #3
    Alan
    Guest

    Re: COUNTIF: drag to change criteria, NOT range

    With the first formula in row 8 try
    =COUNTIF($A$2:$A$36,ROW())
    Drag down and it will count the values in the range according to the row
    number. If you want to put the formula in row 1,
    =COUNTIF($A$2:$A$36,ROW()+7)
    It finds the value of the row number and will drag down whereas a number in
    the formula wont
    Regards,
    Alan.
    "jcmorang" <jcmorang@gmail.com> wrote in message
    news:1139617940.363705.101470@g43g2000cwa.googlegroups.com...
    > Hello,
    >
    > I'm hoping that there's someone out there that can help with this
    > problem.
    >
    > I'm trying to count values in one column so that I have an amount of
    > each for a distribution. For example:
    >
    > 8
    > 8
    > 8
    > 11
    > 11
    > 11
    > 12
    > 12
    > 12
    >
    > I'm using COUNTIF because it's the only one that seems to work, but
    > whenever I drag to fill the series Excel doesn't fill in a linear
    > fashion. Instead it repeats the formulas I've already entered. Here's
    > an example of what I enter into the cells:
    >
    > =COUNTIF($A$2:$A$36,8)
    > =COUNTIF($A$2:$A$36,9)
    > =COUNTIF($A$2:$A$36,10)
    >
    > ...and so on.
    >
    > When I highlight these and drag, the sequence is repeated, not
    > continued to 11, 12, 13 and so on.
    >
    > FYI, if I don't use the $ sign Excel will change the range from A2 to
    > A3, A4, A5...as I drag.
    >
    > I want the criteria to continue (i.e. 8, 9, 10, 11, 12...), not the
    > range and I don't want it to repeat formulas!
    >
    > PLEASE HELP!!!!!
    >
    > Thank you,
    > Jeff
    >




  4. #4
    RagDyer
    Guest

    Re: COUNTIF: drag to change criteria, NOT range

    Try this:

    =COUNTIF($A$2:$A$36,ROWS($1:8))

    And drag down to copy as needed.

    You can enter this anywhere and just have the last number in the formula (8)
    designate the *starting* number to count.
    --
    HTH,

    RD
    ==============================================
    Please keep all correspondence within the Group, so all may benefit!
    ==============================================


    "jcmorang" <jcmorang@gmail.com> wrote in message
    news:1139617940.363705.101470@g43g2000cwa.googlegroups.com...
    > Hello,
    >
    > I'm hoping that there's someone out there that can help with this
    > problem.
    >
    > I'm trying to count values in one column so that I have an amount of
    > each for a distribution. For example:
    >
    > 8
    > 8
    > 8
    > 11
    > 11
    > 11
    > 12
    > 12
    > 12
    >
    > I'm using COUNTIF because it's the only one that seems to work, but
    > whenever I drag to fill the series Excel doesn't fill in a linear
    > fashion. Instead it repeats the formulas I've already entered. Here's
    > an example of what I enter into the cells:
    >
    > =COUNTIF($A$2:$A$36,8)
    > =COUNTIF($A$2:$A$36,9)
    > =COUNTIF($A$2:$A$36,10)
    >
    > ...and so on.
    >
    > When I highlight these and drag, the sequence is repeated, not
    > continued to 11, 12, 13 and so on.
    >
    > FYI, if I don't use the $ sign Excel will change the range from A2 to
    > A3, A4, A5...as I drag.
    >
    > I want the criteria to continue (i.e. 8, 9, 10, 11, 12...), not the
    > range and I don't want it to repeat formulas!
    >
    > PLEASE HELP!!!!!
    >
    > Thank you,
    > Jeff
    >



  5. #5
    Alan
    Guest

    Re: COUNTIF: drag to change criteria, NOT range

    Thats a good one!, never used that before but will in future,
    Regards,
    Alan.
    "RagDyer" <RagDyer@cutoutmsn.com> wrote in message
    news:eXsZliqLGHA.4064@TK2MSFTNGP10.phx.gbl...
    > Try this:
    >
    > =COUNTIF($A$2:$A$36,ROWS($1:8))
    >
    > And drag down to copy as needed.
    >
    > You can enter this anywhere and just have the last number in the formula
    > (8)
    > designate the *starting* number to count.
    > --
    > HTH,
    >
    > RD
    > ==============================================
    > Please keep all correspondence within the Group, so all may benefit!
    > ==============================================
    >
    >
    > "jcmorang" <jcmorang@gmail.com> wrote in message
    > news:1139617940.363705.101470@g43g2000cwa.googlegroups.com...
    >> Hello,
    >>
    >> I'm hoping that there's someone out there that can help with this
    >> problem.
    >>
    >> I'm trying to count values in one column so that I have an amount of
    >> each for a distribution. For example:
    >>
    >> 8
    >> 8
    >> 8
    >> 11
    >> 11
    >> 11
    >> 12
    >> 12
    >> 12
    >>
    >> I'm using COUNTIF because it's the only one that seems to work, but
    >> whenever I drag to fill the series Excel doesn't fill in a linear
    >> fashion. Instead it repeats the formulas I've already entered. Here's
    >> an example of what I enter into the cells:
    >>
    >> =COUNTIF($A$2:$A$36,8)
    >> =COUNTIF($A$2:$A$36,9)
    >> =COUNTIF($A$2:$A$36,10)
    >>
    >> ...and so on.
    >>
    >> When I highlight these and drag, the sequence is repeated, not
    >> continued to 11, 12, 13 and so on.
    >>
    >> FYI, if I don't use the $ sign Excel will change the range from A2 to
    >> A3, A4, A5...as I drag.
    >>
    >> I want the criteria to continue (i.e. 8, 9, 10, 11, 12...), not the
    >> range and I don't want it to repeat formulas!
    >>
    >> PLEASE HELP!!!!!
    >>
    >> Thank you,
    >> Jeff
    >>

    >




  6. #6
    jcmorang
    Guest

    Re: COUNTIF: drag to change criteria, NOT range

    Perfect!!!! You just saved me A LOT of time. It's EXACTLY the result I
    wanted.

    Thanks RD!!!


  7. #7
    jcmorang
    Guest

    Re: COUNTIF: drag to change criteria, NOT range

    Perfect!!!! You just saved me A LOT of time. It's EXACTLY the result I
    wanted.

    Thanks RD!!!

    Cheers,
    Jeff


+ 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