Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# I need an excel formula

Posted on 2013-01-10
Medium Priority
388 Views
I need an excel formula to return the number of unique values in Column A

Then I need another formula to return a number of unique values in column A , only if Column K = N.
0
Question by:wrt1mea
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 3

LVL 24

Expert Comment

ID: 38764679
The following formula Entered with Ctrl+Shift+Enter will count unique values in Column A between A1 and A50000 (cannot use A:A for the array formula)

=SUM(IF(FREQUENCY(IF(LEN(A1:A50000)>0,MATCH(A1:A50000,A1:A50000,0),""), IF(LEN(A1:A50000)>0,MATCH(A1:A50000,A1:A50000,0),""))>0,1))

Am am not sure what you mean by the second part of the question?
0

LVL 1

Author Comment

ID: 38764697
For the second part, i need to return a total number of unique values for column A ONLY IF the values in column K are N
0

LVL 7

Accepted Solution

leptonka earned 2000 total points
ID: 38764840
The first formula:
=SUM(--(FREQUENCY(A1:A5000,A1:A5000)>0))
(confirm with ctrl+shift+enter)

The second - I am not sure I understand correctly. Values of column K should be "N" - so:
=SUM(--(FREQUENCY(IF(K1:K5000="N",A1:A5000,""),IF(K1:K5000="N",A1:A5000,""))>0))
(confirm with ctrl+shift+enter)
or:
Values of column K should be equal to column N? Than:
=SUM(--(FREQUENCY(IF(K1:K5000=N1:N5000,A1:A5000,""),IF(K1:K5000=N1:N5000,A1:A5000,""))>0))
(confirm with ctrl+shift+enter)
In this second case - do you have empty cells in column K and N?

Cheers,
Kris
0

LVL 1

Author Comment

ID: 38764879
Three wont be any empty cells in column K, whis is where the letter N (for No) is at.

The values between column k or N do not need to equal so I will try
=SUM(--(FREQUENCY(IF(K1:K5000="N",A1:A5000,""),IF(K1:K5000="N",A1:A5000,""))>0))
(confirm with ctrl+shift+enter)
0

LVL 1

Author Closing Comment

ID: 38765047
Works great!
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
###### Suggested Courses
Course of the Month8 days, 15 hours left to enroll