+ Reply to Thread
Results 1 to 3 of 3

Count # of occurrences in range

  1. #1
    Registered User
    Join Date
    03-10-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    70

    Count # of occurrences in range

    I'm looking for a function to count the number of times the cell A2 in Sheet7 occurs in the A column of sheet9. This does not work:

    NumFu = Application.CountIf(Sheet9.Range("A:A"), Sheet7.Range("A2").Text)

    Any ideas?

    Thanks in advance
    Last edited by HalPlz; 06-22-2015 at 12:47 AM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Count # of occurrences in range

    What is the value in Sheet7!A2? is it a date?

    Im not sure why, but using the .Text property is giving inconsistent results, .Value is better

    NumFu = Application.CountIf(Sheet9.Range("A:A"), Sheet7.Range("A2").Value)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Count # of occurrences in range

    Quote Originally Posted by HalPlz View Post
    I'm looking for a function to count the number of times the cell A2 in Sheet7 occurs in the A column of sheet9. This does not work:

    NumFu = Application.CountIf(Sheet9.Range("A:A"), Sheet7.Range("A2").Text)

    Any ideas?

    Thanks in advance
    Instead of
    Please Login or Register  to view this content.
    use
    Please Login or Register  to view this content.
    Instead of
    Please Login or Register  to view this content.
    you need to use
    Please Login or Register  to view this content.
    Cheers!!
    Last edited by JBeaucaire; 06-28-2015 at 02:52 AM.

+ 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. Count occurrences of value in a date range I can specify easily each time
    By mikalaka in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-14-2014, 07:14 PM
  2. [SOLVED] Count the occurrences of 3 words in a range
    By tlacloche in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-20-2014, 10:54 AM
  3. [SOLVED] Count occurrences of text in a range
    By braydon16 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-18-2013, 08:33 PM
  4. [SOLVED] Need Help: how to count occurrences of a text character in a range
    By leemanns in forum Excel General
    Replies: 7
    Last Post: 05-05-2012, 01:51 PM
  5. Excel 2007 : Count Occurrences of Text in Data Range
    By gtlandis in forum Excel General
    Replies: 5
    Last Post: 09-22-2011, 11:42 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