+ Reply to Thread
Results 1 to 2 of 2

Return number of unique values based on values in other column

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    4

    Return number of unique values based on values in other column

    Hi all,

    I have a problem and maybe you guys can provide some help. The attachment shows a sample of the data I am working with.

    I need a formula that returns the number of different dates for a certain stock in a certain year. I have used

    =SUM(IF(FREQUENCY($C$3:$C$32,$C$3:$C$32)>0,1)) and this gets me the unique values across the whole data set and I have tried other array formulas to try to filter it for a certain stock in a certain year but I cant get it to work.

    Any suggestions would be welcome

    Thanks

    Medir data.xlsx

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return number of unique values based on values in other column

    Try it like this...

    Array entered**:

    =SUM(IF(FREQUENCY(IF(A$3:A$32=A3,IF(YEAR(C$3:C$32)=B3,C$3:C$32)),C$3:C$32),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Replies: 1
    Last Post: 11-16-2013, 05:18 AM
  2. [SOLVED] Return unique values based on another column's value
    By bd528 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-26-2013, 04:02 AM
  3. Sum values in one column based on unique values in another
    By deepak1987 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-11-2011, 07:37 PM
  4. Find unique value in column and return multiple values
    By DWolf75 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 08:32 PM
  5. Look across values in 12 columns, return the number of unique values
    By NukedWhale in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2009, 05:18 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