Getting Distinct Counts From Multiple Columns?

Sep 28, 2011

How to calculate a count of unique records across two columns (customer number and acct number) with out much luck. For example, a customer number may appear 3 times but be associated with 3 separate acct numbers.

I've found a lot of in-depth formulas online but I'm not sure if they're what I need. I think I need some sort of array formula but I'm a little stuck.

View 9 Replies


ADVERTISEMENT

ADO Select Distinct Multiple Columns

Aug 5, 2009

I am using ADO to select data from a CSV file, column 1 has some duplicate Incident numbers, but the rest of the columns the data may be different but not interested in that so I cannot use SELECT DISTINCT incident, desciption as this applies to all columns

so I tried the following

StrSQL = "SELECT DT.IncidentNumber, ST.Description -
FROM (SELECT DISTINCT IncidentNumber FROM " & StrFile & " ) DT -
INNER JOIN " & StrFile & " ST ON DT.IncidentNumber = ST.IncidentNumber"

however it returns ALL rows, if I use just

SELECT DISTINCT IncidentNumber FROM " & StrFile

I get the rows I am interested in but not the extra data I require

View 9 Replies View Related

Create Distinct Unique List For 2 Columns

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

Counting Rows Based On 2 Columns (Distinct)

Mar 19, 2007

From a base table, I need to create a new table listing only the unique combination of 2 columns and their individual sum. Example:

Base Table:

ITEM-----Loc-----QTY
Pen------School----5
Pencil----Office-----9
Binder---Office-----9
Pen------Office-----6
Pen------School---15
Binder---School---12
Pencil----Office----10
Binder---School----6
Pen------Office----11

I need to have a table resulting to the following:

Item-----Loc------Qty
Pen------School----20
Pencil----Office-----19
Binder---Office------9
Pen------Office-----17
Binder---School----18

View 9 Replies View Related

Extract Unique Distinct List From Two Columns With Array Formula And Sort From A To Z

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

Pivot Table With Columns Listing Counts

Dec 10, 2012

I have a spreadsheet similar to this:

Name........Cat....Dog....Fish....Mouse
NY............Cat.....Dog....Fish..........
NY............Cat...............Fish....Mouse
DC.....................Dog..............Mouse
DC...............................Fish............
CA ...........Cat................................

I want to create a pivot table to do this:

Name.........Cat....Dog....Fish....Mouse
NY...............2.......1.........2........1..
DC...............1......1..........1............
CA ...............1.............................

I have been unable to get it formatted correctly. The closest I get are "sub-colums" with counts.

View 2 Replies View Related

How To Get Counts By Date Wise Data In 2 Different Columns

Dec 24, 2012

I have a query with regards to Counts

This is my below data.
No.Request NoDateSilverGold
1456661-Dec-20121
22018561-Dec-20121
32089561-Dec-20122
42099721-Dec-20128
52012121-Dec-20122
62068782-Dec-20122
72075952-Dec-20123
82045682-Dec-20123
92032252-Dec-20122
102015852-Dec-20121

in other sheet i have products Data by date wise
1-Dec-122-Dec-123-Dec-12
TotalRequest countTotalRequest countTotalRequest count
ABSilver2
Gold12

My query is how to get the total Request Count for Silver and Gold by date wise. Eg: Answer should be Silver has 2 (counts) & Gold has 3 (counts) How to arrive to that.. i have tried.. countif, countifs....

View 3 Replies View Related

Multiple Text Searches And Counts

Jan 21, 2009

I have data created by a program where it gives me a column "Code" with different text categories (in this case names of people). One person appears multiple times in this column as it track each time they register a statistic for the sporting event. The statistics are text fields registered under the column Labels

So I have two columns titled "Codes" and "Labels"

I need to extrapolate from this data a count of times each statistic happens for a specific player.

Example:
Code: Labels:
John FGA
John FGM
Joe FGA
Joe OREB
Zach TO

What I need is broken down by player with counts of each category FGA, FGM, OREB ect specific for each player creating a box score for the event.

View 9 Replies View Related

Counts Info Based On Multiple Conditions

Feb 22, 2009

I am trying to get a list which counts info based on multiple conditions but I can find no way round this one point

I have a sheet which has all the games played in a particular division and the time that each goal was scored and I am trying to break down the following

What I want is a list that has a column that has the result of how many times when team A were playing at home was a goal scored between the 45th and 65th minute


column A = Home Team
B=Away Team
C= Time of First goal
D=Time of Second goal
E=Time of Third etc

I have a countifs in place for counting the home team and counting if the first goal was scored in under 10 minutes (this is simple as obviously all the first goals are in column C) but what I want to do is be able to have a count of how many times a goal was scored between x number of minutes eg between 40-50.

My problem comes when trying to count the goal times as some matches will have no goals and the cells will be blank and others will have multiple cells filled and the figure I want could be in any column and I also only want it to count only the amount of games a goal was scored between those times so if a game had 3 goals scored in between that time I only want it to count 1.

The sheet has a lot more columns but this is the main sticking point.

View 10 Replies View Related

Returning Distinct Values From A Table?

Jul 30, 2014

I have a set of cells and i want it to return all of the distinct or unique values within that matrix. for example, lets say this table charts how many sales an employee makes in a week.

sun mon tues weds thurs fri sat
john doe 1 0 3 2 3 0 0
jane doe 0 8 0 1 0 7 0
james doe 3 3 2 3 2 1 1

the desired output would be: 0,1,2,3,7,8

I don't want to be copying all of the cells or doing a lot of manipulation - i know i can copy, sort, and get unique values that way - i want a formula where as i plug in values, this field is updated to include all of the distinct or unique values.

View 2 Replies View Related

How To Count Distinct Values In A Column

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

Distinct Values From 2-dimensional Range?

Sep 18, 2012

I'm a huge fan of the DistinctValues function published by C Pearson here: Distinct Values Function

Now I have the problem that I need to get all the distinct values from a 2-dimensional range.

View 1 Replies View Related

Distinct Count In Variable Range?

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

Counting Based On Two Distinct Values

Apr 18, 2013

I am trying to count multiple occurences.

Instrument Name
Times Traded
AEON CO LTD
6
ASICS CORP
3
ELECTRIC POWER DEVELOPMENT C
10

In column C (Times Traded) I have used a simple countif formula: =COUNTIF($B$2:$B$8068, C2)

Now I have to check for how many times this instrument was bought or sold. This is in column A .... How will I count the Buy values ... cause this formula I devised doesnt work =COUNTIF($B$2:$B$8068, and(C2, A2:A8068="Buy")

View 4 Replies View Related

Distinct List Of ID Numbers From Several Sheets

Jul 22, 2014

I have several sheets in one workbook. For ease, the sheets are labeled Customer1, Customer2, Customer3 etc. Within these sheets are 5 columns of data, with unique headings that are consistent for all Sheets.

In Column A of each Customer sheet, is the Product ID number. I would like a distinct list of all Product ID numbers in the workbook, across all Sheets. (The amount of data in each sheet may increase or decrease)

View 7 Replies View Related

Formula: Count Distinct Values

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

Counting Unique / Distinct Occurrences With Wildcard

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

Identify Distinct Start Stop Times?

Aug 21, 2014

I am attempting to create a datasheet to track the actual time an agent takes a break or lunch. Here is an example of the data that I am using.

name Date Lunch Sch Brk1 Sch Brk 2 Actual Time
BrandonHolt8/19/201411:10 8:30 1:20 8:24:20 Break
BrandonHolt8/19/201411:10 8:30 1:20 11:42:34 Break
BrandonHolt8/19/201411:10 8:30 1:20 12:57:46 Lunch

Because I have two break times, possibility of more depending on the agent, how do i create a formula that will look at this data, take the schedule time for say break one and only apply that against the time that is more in line with the closest actual time?

View 1 Replies View Related

Filtering Duplicate Values With Distinct Scores

Feb 24, 2014

I have an excel which is containing records of users who have given an online test.Many users have given the test multiple times. I need to extract the records of every individual with the highest score. example it could be individual A, B and C have given the test 3 times with different scores achieved. I need the records of A, B and C in which their score was maximum.

View 7 Replies View Related

Distinct Colours In A Cell And Conditional Formatting

Feb 8, 2010

This question about conditional formatting appears to be easy. Lets say I have a column like the following, like I posted somewhere else: (not very relevant for this)

BGW
3UG
WWU
1BR
UUBRG
WUBRG
7UUGGRRR

How do I have all characters in this column be coloured accordingly to:

W = WHITE
U = BLUE
B = BLACK
R = RED
G = GREEN

So that 7UUGGRRR would automatically switch to:
7UUGGRRR

What I already tried:

- I applied conditional formatting to the column (actually, the cells interval, [C2..C8]) creating the rule: 'format only cells that contain -> specific text' -> then I added "U" as the text and told it to colour blue. As I predicted, this didn't work; the entire cell containing a single "U" will get blue, which is unwanted.

View 9 Replies View Related

Auto Populate Distinct List From One To Another Table

Sep 12, 2012

I have two tables on two different worksheets. I would like to automatically populate a distinct list into column A in table 2 from the data in column A in table 1.

Table 2 must auto populate from table 2 every time a new row is added into table 1 - without any extra user interaction e.g. pressing a button etc. No offense intended to my better half but if she has to do anything more than enter a new row in table 1 she'll likely manage to screw it up after a week

I kind of managed to get it working using the below formula but both sets of data must be in tables so I can't copy the formula down the column without creating redundant table rows.

=INDEX(Classes!$A$2:$A$999, MATCH(0, COUNTIF($A$1:A1, Classes!$A$2:$A$9), 0))

Example

Sheet 1 = "Classes"
Column A = "Student Names"

John
Mike
Paul
Andrew
Paul
Paul
Mike

Sheet 2 = "Total Due"
Column A = "Student Names"

Paul
Mike

View 3 Replies View Related

Create Distinct List And Sort Alphabetically?

Jul 16, 2013

I am trying to create an alphabetised unique list for a report from an Excel master file and have searched the internet for solutions which all only seem to half work for me. I've copied a couple of array formulae below to try what I'm after and what the results are. 'RefSource' is the name I've given to the column of data I'm trying to sort.

{=INDEX(RefSource, MATCH(0, COUNTIF($A$2:A2, RefSource),0))}

This one works when I copy the formula down and gives me the unique list but doesn't sort the it into alphabetical order.

{=INDEX(RefSource, MATCH(MIN(IF(COUNTIF($P$1:P1, List)=0, 1, MAX((COUNTIF(RefSource, "

View 1 Replies View Related

VB Code To List Distinct Values + Associates

Apr 7, 2008

I have a workbook with two worksheets:

Input
Entitlment

On workbook called "Input" range A2 downwards are a series of staff names, non unique

When I select the worksheet called "Entitlement" I would like on this sheet range A2 downwards to list staff names in alphabetical order but only unique occurances of a persons name.

eg if on sheet "Input" cell A2="darrenS", A3="darrenS", A4="EdwardG", A5="EdwardH"

upon selecting "Entitlement" sheet
A2 would show "darrenS"
A3 would show "EdwardG"
A4 would show "EdwardH"

I user will then have to enter a number relating to number of accounts in ColumnB

should a name already have an existing number next to it then when the worksheet "Entitlment" is selected again the number will reamin associated to the name. When sorting occurs !

View 9 Replies View Related

Distinct Count Of Range Using A Lookup Criteria

Feb 9, 2009

I have a problem getting an adequate formula for the following.

"Sheet 1"
Column A.............Column B
Employee Code.....Distinct Count
ZZADW...............Formula Result
ZZALM................Formula Result
ZZALS................Formula Result
ZZANG................Formula Result

"Sheet 2"
Column A............Column B
Employee Code.....Account Number
ZZADW...............1SSS
ZZADW...............1STT
ZZALM................5GHL''''''''

View 9 Replies View Related

SUBTOTAL IF Formula To Sum Distinct Values In A Column

Jan 2, 2010

I'm looking for a SUBTOTAl IF function (if there's any) that would sum all the distinct values in a column for a given criteria based on another column. My data is listed below:

Column A Column B
(Quarter) (Revenue)

Q1 2008 $10
Q1 2008 $10
Q1 2008 $20
Q2 2008 $15
Q3 2008 $25
Q3 2008 $25

I'm looking for a formula to sum the DISTINCT Revenue values for Q1 2008, Q2 2008, and Q3 2008 based on the autofiltered list. The formula result should change dynamically based on the autofilter selection.

View 9 Replies View Related

Formula Taking Long Time To Get Distinct Word?

Mar 15, 2012

I get distinct word with this formula i have 30,000 rows with below formula taking lot of time with dragging to all cell

{=INDEX(List,MATCH(0,COUNTIF($b$1:b1,List),0))}

View 5 Replies View Related

Create Helper Column That Marks Distinct Values

Nov 26, 2012

I have a table with 200.000 rows.

I need to create a helper column, that marks distinct values with 1 and not distinct "" or 0.

I tried the following but both use countif and I believe it is the problem it's just to slow.

=IF(COUNTIF($A$2:A2;A2);1;0)
=1/COUNTIF($A$2:A2;A2)

but both are really slow +20 mins to calculate and many times Excel crashes( 2007 32bit).

The workbook is really simple

Col1 (number formatted as text) - Col2 =distinct

View 6 Replies View Related

Macro/formula To Count Distinct Resources And Match To Location

Oct 8, 2009

i am looking to create a small table from the attached worksheet that will show how many users there are for 3 different locations, the user names are in column a and the locations in column c. the thing is, the actual worksheet i am using in work contains almost 1000 lines, and is being updated daily, there can be multiple entries for a person for projects etc.. and someone can even be in the availability and pto area's without being in the main project area. each resource can only be on one location so that will not change.

also, there can be blank cells for resource which should not be counted. i was wondering if there was a formula or a macro that would count the distinct number of names and reference them to the location and give a count of resources by location?

View 2 Replies View Related

Formula That Counts

Jan 13, 2009

in sheet 2 cell g16 i need it to count how many times "horse racing" appears in sheet 1 column m and also for it to count how many "y" are in column g of sheet 1 and return something like

4 from 4
this example is taken from the attached sheet

basically it needs to count the yesses in column g that correspond to the horse racing in column n

so there could be 7 instances of horse racing ( 4 in this example ) and count the y's in column g which could be 2 ( 4 in this example ).

View 6 Replies View Related

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 View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved