+ Reply to Thread
Results 1 to 2 of 2

newbie's countif

  1. #1
    Registered User
    Join Date
    09-19-2006
    Posts
    39

    newbie's countif

    Overview

    Hi there,

    This is fairly basic. I want to be able to count the number of cells which meet a specified criteria.

    The COUNTIF function works if I enter the criteria manually within a COUNTIF formula. But the function doesn't seem to work if I try to reference criteria from another cell.

    For example, suppose the range of cells I'm searching for matches within has been named

    Possible_outcomes .

    In addition, the criteria I'd like to use is in a cell called

    PROFIT_THRESHOLD,

    and is the result of a formula. Let's say the formula result equals 130.

    Countif works when I enter the criteria manually, i.e.

    =COUNTIF(Possible_outcomes,">=130")

    But it returns only a 0 when I write the formula as

    =COUNTIF(Possible_outcomes,">=PROFIT THRESHOLD")

    I can't make the function work even if the criteria is in a cell which is not named either.

    This is a serious obstacle to model automation. Any tips?

  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,

    Try

    =COUNTIF(Possible_outcomes,">="&PROFIT_THRESHOLD)

    VBA Noob

+ 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