Sumproduct (count The Number Of Unique, Or Distinct, Company Names In Column)
Jan 28, 2010
I want to count the number of unique, or distinct, company names in column [C7], subject to two conditions that will exclude certain unique company names from the count.
I should also point out that most company names appear multiple times in column [C7].
a) Count the unique company names in column [C7]...
b) ...including only those companies who have at least one "Yes" in column [C8] somewhere among their records
c) ...and who also have at least one value equal or greater than "1" in column [C15] somewhere among their records
Note that that there is no requirement that the "Yes" and the "1" ever appear in the same record.
View 2 Replies
ADVERTISEMENT
Jan 22, 2010
I have 1500+customer names in column C7 of table. I'm looking for a SUMPRODUCT formula that achieves the following 2 logical goals. First, it needs to determine the number of unique names in column C7. It can't just count the rows because many customers appear multiple times in the range. So, I have been using the following formula and it works great:
=SUMPRODUCT(
((Table[C7]<>"")/COUNTIF(Table[C7],Table[C7]&"")))
Second, I'd like the formula to tell me how many of the unique names in C7 correspond to public companies. Column C8 of my table indicates whether or not a company is public ("Yes") or private ("No"). So, I've been using the following formula and it seems to deliver the right result:
=SUMPRODUCT(
((Table[C7]<>"")/COUNTIF(Table[C7],Table[C7]&""))
*
(COUNTIFS(Table[C7],Table[C7]&"",Table[C8],"Yes")>=1))
But the added COUNTIFS statement seems very unwieldy and indirect to me. Why do I have to examine every instance of a particular company's name when the answer could be determined by looking at any instance of the name -- after all, each company in C7 is either public or private, and has the same corresponding value in C8 (whether "Yes" or "No") everywhere that its name appears in C7!
So that's my first question: is there a clearer, more efficient way to achieve the same result? My second question has to do with toggling the public company test.
What if I create a special cell, say A1, that will always contain either the word "On" or "Off"........
View 4 Replies
View Related
Apr 4, 2013
I've got a set of data that I update once a month and the number of team members per team changes all the time. I'm trying to write a formula that basically says, if the date matches AND the manager name matches, count the number of team members.
In the attached sample if A2 and B4 are found in the data set, count the number of SalesReps they have. So I'm looking at Sarah for February 2013, she has two sales reps that sold something, but Katherine appears twice, so I'm not looking for a result of 3, the correct answer is 2. How do I write the formula?
A2 will look to the data range of A14:A23 and SarahK will look to I14:I23, but I want to count H14:23.
View 9 Replies
View Related
Jan 11, 2013
The code below extracts unique distinct values from column A, except cell A1. Then the code adds the extracted unique distinct values to the combo box.
Sub FilterUniqueData()
Dim Lrow As Long, test As New Collection
Dim Value As Variant, temp() As Variant
ReDim temp(0)
On Error Resume Next
With Worksheets("Sheet1")
[Code]....
The vba code below copies the selected value to cell C5 whenever the combobox is selected
Copy the code into a standard module.Assign this macro to the combobox
Sub SelectedValue()
With Worksheets("Sheet1").Shapes("Drop Down 1").ControlFormat Worksheets("Sheet1").Range("C5") = .List(.Value)
End With
End Sub
Vba code belows instanly refresh the combobox when values are added/edited or removed from column A,
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("$A:$A")) Is Nothing Then
Call FilterUniqueData
End If
End Sub
My problem is this:
Everything will be working fine if the all combobox and data can be found in 1 sheet, but how could i make some tweaks if the combo box is located in sheet 2 provided your data to be populated is in sheet 1, i tried everything but the combobox doesnt update,
View 1 Replies
View Related
Jan 21, 2014
I have a spreadsheet which contains (see illustration below):
1. a column called LEAD ID which contains a unique id
2. a column called WON which signifies if the deal was won/not won (1 = WON, blank = Not Won)
I can have multiples of the same value in the Won and Unique Id field (see illustration below)
I would like to create a formula field which returns the summary of the No. of Deals WON
I need to tie the formula back to the Lead ID and whether or not the WON field contains 1 or not.
I've tried this formula but it won't work
(Lead ID is in Column A, WON is in column B)
=IFERROR(SUM(1/COUNTIF((A:A,A:A) AND(B2=1)),"0")
LEAD ID WON No. Won (Formula field)
abc112 0
abc222 1 .25
abc222 1 .25
abc222 1 .25
abc222 1 .25
abc333 1 1
abc444 0
View 9 Replies
View Related
Mar 5, 2014
I am trying to count the distinct times a value shows up in a column, if another column has a 2 in it.
For example:
Columns
A, B
2,P25
2,P25
3,P5
3,P6
2,P5
The results shoud be: (2) Because I only want to count the P25 one time.
I'm using Excel 2010
View 2 Replies
View Related
Jan 6, 2014
I have a list of names all in one column, separated by row...
Example...
John Doe
John Doe
Jane Doe
Jane Doe
Jane Doe
James Jones
James Jones
I want to count how many times each name appears. Like this:
John Doe | 2
Jane Doe | 3
James Jones | 2
This is a very large list of names and I prefer not to have to type each single name into a formula because there are hundreds of separate names.
View 4 Replies
View Related
May 4, 2006
i'm currently trying to count the number of unique numbers in a Column using this formula:
=SUMPRODUCT((A3:A3002<>"")/COUNTIF(A3:A4002;A3:A3002&""))
So far so good.....But I want to add some conditions like only count the numbers that meet the condition say N1:N3000="SE*"
=SUMPRODUCT((A1:A3000<>"");(AND(OR(N1:N3000="SE*";N1:N3000="INC*")/COUNTIF(A1:A3000;A1:A3000&""))))
On this one I get #VALUE! and i can't figure out why.
I have also tried to put the AND/OR condition before the actual starting of the array of the SUMPRODUCT but nothing.
View 14 Replies
View Related
Apr 7, 2006
I have a column where I have record numbers. The record number can end up duplicate in some cells.
PROBLEM_ID
IBM-02204732
IBM-03252238
IBM-03252238
IBM-03335648
IBM-03534918
IBM-03534918
IBM-03862015
IBM-03862015
IBM-12737629
IBM-12737629
IBM-17269762
I would like the get a formula that can count the number of unique numbers in that column?
I would like to get if possible to get a formula that summarize the number into a single cell.
View 9 Replies
View Related
Nov 2, 2011
I'm trying to write a formula that will count the number of unique occurrences in a column, if a specified value is found in a different column.
So I want to count the number of unique values in the "ID" column if let's say the text "NameA" appears in the "Name" column.
ID Name 12345
NameA
NameB
NameA 12346
View 5 Replies
View Related
Nov 17, 2011
What is the formula for sumproduct to count a say column c for a range of names and as long it match column k for yes.
View 1 Replies
View Related
Dec 24, 2013
I have two columns in excel, col A and col B.What I would want to achieve is following:
Col A Col B
A 2
A 2
A 2
B 3
B 3
B 3
B 3
C 3
C 3
C 3
Now I want a total of values in column B pertaining to unique (or say 1st occurences) of values in Col A. So in this case the output should be 8 ,Achieved as follows(2 +3+3).
[URL]
View 5 Replies
View Related
Jul 9, 2009
The question is presented and explained within the attached WB.
View 4 Replies
View Related
Oct 29, 2012
I need to map two lists of company names. 1st list is master list having around 1lakh company names. 2nd list have around 500 records which i need to manually match bcoz index and match functions just dont work.
What i currently do is copy a part of company name from list2, go to list1 and apply a contain filter and if any matches are found, take the closest match to list2.
This is a tedious task for 500 companies as it involves to many mouse clicks. We just need to paste a part of company name in search box and a contain filter is applied to list 1.
View 5 Replies
View Related
Aug 5, 2014
I'm working with a set of text values. The sets of text can be either 2 or 3 chars long (in this example 2), and are separated with a pipe. The end char for each set of chars in fixed. In this case a Z.
I'm looking for a formula which counts the unique / distict number of sets of chars. I have been trying to use COUNTIF with a wildcard (?Z), but unfortunately I haven't been able to find the correct formula yet.
For example.
|AZ|AZ|AZ|BZ|AZ|AZ|BZ|AZ|BZ|AZ| -> 2 (AZ, BZ)
|AZ|AZ|AZ|BZ|CZ|AZ|CZ|AZ|BZ|AZ| -> 3 (AZ, BZ, CZ)
|CZ|BZ|AZ|BZ|CZ|AZ|EZ|AZ|FZ|AZ| -> 5 (AZ, BZ, CZ, EZ, FZ)
|BZ|BZ|AZ|BZ|CZ|AZ|EZ|AZ|GZ|AZ| -> 5 (AZ, BZ, CZ, EZ, GZ)
View 9 Replies
View Related
Aug 6, 2014
So far I created code that creates a Distinct Unique item's list for one column. It works as it should but I want to modify the code to create a Distinct Unique item's list for two columns that are related to another i.e. a person's name to their license #.
Here is the code below that works for one column only:
[Code] ......
View 9 Replies
View Related
Jan 30, 2008
in column a I have dates and in column b I have names.
eg
A1 = 1/1/08
A2 = 2/3/08
A3 = 3/1/08
A4 = 3/1/08
B1 = Jenny
B2 = Jenny
B3 = Jenny
B4 = Pat
I am trying to count the number of instances of "Jenny" in January.
I tried =sumproduct(A:A,>=39448
View 9 Replies
View Related
Oct 31, 2008
I have been given a database with peoples names that require a unique number to hide/replace the name to hide their identity for a meeting and to act as a ghost system.
The problem i have is that some individuals names on the list appear more than once so i cannot simply call Joe Bloggs number 3 as he can appear further down the list at number 120.
I was wondering is there is a way to do this without manually replacing each name with a number and making and logging the persons name that corresponds to the number.
as there are 600 names and some can appear up to 4 - 5 times!
View 9 Replies
View Related
Jun 18, 2007
I have a column which has about 600 Names, and some of them are repeated, so I want to extract the Unique of them into a separate column, How can I do that?
View 5 Replies
View Related
Nov 5, 2009
=SUMPRODUCT(SLVL!$B$6:$B$49>=$A$2)*(SLVL!$B$6:$B$49<=$B$2)*(SLVL!$A$6:$A$49=A12)
I'm sure that there had been an error somewhere but I can't figure it out. I'm getting zero value. Situation: need to count number of leaves within a specified period, thus I opted to use Sumproduct.
View 4 Replies
View Related
Jan 8, 2012
I'm trying to match stock portfolios of mutual funds with stock indexes to find out how much the portfolios deviates from the indexes (active share).
The deviation is simply calculated as the percentage of the portfolio holdings not included in the index.
The data I have is 10 years of monthly portfolio weightings for 30 mutual funds and 8 indexes, organized with company names in column A and the percentage weight for each company in each month in the adjacent rows (see simplified screenshot). I want to match all companies with all indexes.
Twofold:
1)The mutual fund data comes from one source and index data from another. This means company names are not spelled exactly the same.
2)Within the mutual fund datasets, a company might be listed more than once with different names. The different names refer to different periods in time, so what should be matched with the index is the sum of these columns.
The specific task that I need to accomplish is to match company name in the portfolio with the index and then return the absolute difference between weight in the portfolio and the weight in the index for each month. (see screenshot).
Hence the result I'm looking for is a matrix of company names (of each portfolio) in col A and the absolute difference between the portfolio and the index weight in the adjacent row.
The best solution I've come up with is to device a list of all the portfolio company names, including "doubles", and then for each index, add these company names and copy the row weightings. This I'm not particularly happy with because index weightings would no longer sum to 100 and it would be difficult to check for errors. Also, it would still take a lot of time.
View 6 Replies
View Related
May 30, 2014
I have two lists in different columns, which are defined ranges. I want to extract them to a unique list with an array formula and at the same time sort albafetically, without duplicates, like this:
List1
List2
Final List
Audi
Ford
[Code] ....
So far, I have this formula which is working in what concerns removing duplicates and exctract a unique list. But it is not ordering alfabeticaly.
{=IFERROR(IFERROR(INDEX(List1, MATCH(0, COUNTIF($D$1:D1, List1), 0)), INDEX(List2, MATCH(0, COUNTIF($D$1:D1, List2), 0))), "")}
View 2 Replies
View Related
Jan 17, 2014
I'm trying to count the number of rows in a dataset where column A is something, B is something, C is something, D is not something, D is not something else, and column E > 0 OR F is something but I just can't get the result I want.
My actual dataset is a staggering 294,000 rows and 46 columns so here's a simplified version:
View 8 Replies
View Related
Jun 29, 2009
I have a formula which I have copied from one of your good selves and tried to adapt it. The formula is below. I a am getting #NA as my answer.
=SUMPRODUCT(ISNUMBER(FIND({"h","H"},B11:G11))*{0.5,1})
I have a person name in Colomn A and then 1 week B-G on a row and want to count number of days holiday.
View 4 Replies
View Related
Nov 3, 2009
I have attached a spreadsheet with a small indicative data set to assist in understanding. I am trying to count the number of documents each individual has assigned to them that are not yet 'completed' (ie REGISTERED, IN WORK, REVIEWED). The problem I am trying to overcome is that the document state can be 1 of several values indicated in the same column.
I have tried using this SUMPRODUCT formula:
=SUMPRODUCT((($E$2:$E$11="REGISTERED")+($E$2:$E$11="IN WORK")+($E$2:$E$11="REVIEWED")*($B$2:$B$11="Jones")))
but it is generating incorrect values!
Specifically:
- Jones shoulld return 1
- Franks should return 3
- Smith shoudl return 0
View 4 Replies
View Related
Feb 6, 2013
I have a 97-2003 spreadsheet with approximately 22,000 lines of seperate companies. I need to know how to insert a blank line between the company names. I have been using the "Right Click - Insert" method but soon realized there must be 2000 different companies. The Company Name column is A.
View 7 Replies
View Related
Apr 3, 2013
I have a workbook with multiple sheets. On each sheet is different sets of sales person data. Each set consists of a sales order number, and the type of product that was sold.
I need a count of all the distinct product types that each sales person sold.
I need the solution in VBA, as i need to run the macro through all the worksheets. The size of the range for each sales person differs.
I have got all the VBA done, except for the part where i specify the FORMULAR1C1 for the specific cell, to do the distinct count.
View 1 Replies
View Related
Dec 23, 2006
I have this formula that works perfectly in Excel. It counts the unique TEXT values in a column. But it does not work in the VBA editor. Count = SUMPRODUCT((C6:C39<>"")/COUNTIF(C6:C39,C6:C39&""))
View 2 Replies
View Related
Aug 19, 2014
I want to count the number of unique companies that joined in different months. I have two columns to work with - date [in time stamp/data format] and company name.
DATE
COMPANY NAME
10:42 02/01/14
A
11:33 02/01/14
B
16:14 07/01/14
The results should equal -
Jan 14 - 2
Feb 14 - 2
Mar 14 - 1
The closest I have gotten it to remove duplicates =SUMPRODUCT((B1:B15<>"")/COUNTIF(B1:B15,B1:B15&"")) and to count the months =COUNTIF(A1:A15,"*01/14") but I cant seem to link the two.
View 14 Replies
View Related
Mar 23, 2009
I am looking to be able to count if prices have changed between periods
See the example below, I am assuming it is an If statement...
View 14 Replies
View Related