+ Reply to Thread
Results 1 to 3 of 3

Finding similar but not identical values using COUNT and COUNTIF

  1. #1
    Registered User
    Join Date
    10-24-2011
    Location
    Umeå, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    3

    Finding similar but not identical values using COUNT and COUNTIF

    Hi.
    I tried to get help for this problem: http://www.excelforum.com/excel-work...-datasets.html but realized that I maybe posted a too extensive question.
    Now I'm simplifying it and asking: What is wrong with this formula?
    =COUNT(H5:H16)-COUNTIF(H5:H16;"<E5")-COUNTIF(H5:H16;">F5")
    For some reason the formula is not recognizing my criteria (marked in red). How should I formulate them?

    For the record: I want to find in a dataset values that are equal or close to value X. I use this formula to search within a dataset and use the -COUNTIFs to exclude data that are too far above or below my desired range.
    Last edited by krixtoffer; 10-25-2011 at 01:42 PM. Reason: Issue solved

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Finding similar but not identical values using COUNT and COUNTIF

    Because your cell references are in quotes they're being treated as literal values.

    You need to modify your formula to =COUNT(H5:H16)-COUNTIF(H5:H16;"<" & E5)-COUNTIF(H5:H16;">" & F5)

  3. #3
    Registered User
    Join Date
    10-24-2011
    Location
    Umeå, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Finding similar but not identical values using COUNT and COUNTIF

    Thanks a million! Works like a charm now. Instead of hours and hours of sheer pain it will now be a wonderful stroll to success. Thanks a lot!

    Kristoffer

+ 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