+ Reply to Thread
Results 1 to 3 of 3

Count number of occurences in a range

Hybrid View

  1. #1
    Registered User
    Join Date
    08-20-2007
    Posts
    60

    Count number of occurences in a range

    Hello,

    I am kinda new to VBA and I am trying to count how many times a keyword (ECAP (10%---20%) ) repeated in column "A" in a sheet.

    I tried but results are not right, if someone can give me a helping hand, that would be great.

     j = ActiveSheet.Range("A2:A2000").Find("ECAP (10%---20%) ").Count
    Thanks in advance, Anil

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You don't need VBA, use the COUNTIF function. This can be used in VBA.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-20-2007
    Posts
    60
    Yes - it solved my problem. Thanks a lot, you are too quick and good. Anil

+ 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