+ Reply to Thread
Results 1 to 5 of 5

Countif Situation....

  1. #1
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183

    Question Countif Situation....

    Hi, I am trying to use the countif command to count only numbers above
    zero and below 45 in a column. The Column is H5:H1000. The column contains negative
    numbers that I do not want to count. Just numbers above zero but below 45.

    Thanks For any Help On This.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Thx for changing the title.

    Try

    =SUMPRODUCT(--($H$5:$H$1000>0),--(H5:H1000<=45))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183
    No Prob, VBAnoob.

    I am still getting a count on the negative numbers with your formula.
    The count is true with the negative numbers when the formula is applied as
    an array.

    When it is not applied as an array, there is no count for numbers between
    0 (zero) and 45...

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Works for me

    VBA Noob
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183
    VBA, I see what is happening. The cells I have, H5:H1010, has a formula
    in them that subtracts dates to give a day(s) value. The sumproduct
    formula you provided me with only works if it is applied after the date
    calculations.

    For example: If I input a date and the results are displayed in the H cells
    as days, the sumproduct formula will not update to show the count, but
    only if I re-paste the formula, then it will show the correct count in the
    H cells. ..Wierd?

+ 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