+ Reply to Thread
Results 1 to 4 of 4

Count the occurance of value

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    2

    Count the occurance of value

    I have two sheets:

    Sheet 1
    Col A
    A
    B
    C
    D

    Sheet 2
    Col A Col B
    A XX
    B YY
    AXX
    A Z
    D D
    DD

    I want to count the number of unique occurance of value in Col B in Sheet 2 as per value in Col A in sheet 1 and Sheet2.


    My output result should be like following:


    Result
    Col A Count of col B value in Sheet 2
    A 2
    B 1
    C 0
    D 1






    Thanks for help.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Count the occurance of value

    B1:

    =SUM(IF(FREQUENCY(IF(Sheet2!$A$1:$A$6=A1,IF(Sheet2!$B$1:$B$6<>"",MATCH(Sheet2!$B$1:$B$6,Sheet2!$B$1:$B$6,0))),ROW($B$1:$B$6)-ROW(A2)+1),1))

    Confirmed with Ctrl+Shift+Enter

    and copy down
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    02-20-2014
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Count the occurance of value

    daffodil11, Thanks for your help.

    Regards,

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Count the occurance of value

    No problem.

+ 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. consecutive value occurance count?
    By scuddy in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 04-23-2008, 08:08 AM
  2. Count Occurance in Column
    By Brokovich in forum Excel General
    Replies: 3
    Last Post: 04-18-2007, 01:10 PM
  3. Count each occurance in range
    By godspeed in forum Excel General
    Replies: 9
    Last Post: 09-15-2006, 10:56 AM
  4. Count the occurance of a value x a value in another cell in excel
    By KL in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  5. Count the occurance of a value x a value in another cell in excel
    By Batty in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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