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


ADVERTISEMENT

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

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

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

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

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

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

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

Counting Values Based On Table

Jul 25, 2013

I have a column of data (say in cells J1 to J20) such as

AB*
CD+
EF&

etc etc - not every cell has an entry.

In another column elsewhere, each of these items has a number associated with it, e.g.

AB 3
CD 3
EF 4

Note that the symbol (*,+,&) is not in the table.

What I want to do is this: For each value in column J, I want to lookup it's corresponding value in the table and add 1 to a count if the value is say 4 (so in the example the cell containing my result would be 1 because only EF has a value of 4). If I wanted a value of 3 my count would be 2 (because AB and CD both have a value of 2).

I think I need a combination of countifs, vloopkup and left (as I need to strip off the number in row J somehow) but I can't get the syntax right (left for example won't work on a range).

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

Counting Unique Values Based On 2 Criteria

Aug 11, 2007

Is it possible to count unique values in one column based on that column and another column? I have a report that has a column of dates (B:B), column of month and year (C:C), and a column of RMA numbers(A:A). The RMA numbers repeat if there is more than one part on the RMA. I would like to count the number of RMA created each month. Below should be Jan = 2; Feb = 2; Mar = 1............

I have a CSE formula that allows me to count based on two criteria but it does not count unique values and you have to specify the two criteria.

View 4 Replies View Related

Counting Unique Values Based On A Variable

Dec 15, 2009

I'm having difficulty trying to write a formula for the following type of data:

[data] ....

This is a data set with 10k+ lines; I have about 150 different items in the "Criteria" column. What I want to do is count how many unique items occur in "Column to be counted" by each vairable in the "Criteria" column. The output should look like this: ...

View 9 Replies View Related

Counting Unique Values Based On Condition In Different Column?

Aug 21, 2014

Formula which will count unique values in column A based on condition in Column B which "y" .....

Show ranges as A:A instead of A1:A100 as I dont know the size of the table, it can be thousands rows .....

View 3 Replies View Related

Counting Unique / Different Values Based On Multiple Criteria?

Jan 21, 2014

I have a large sheet (several thousand rows and growing) - see a small cut of the data. The columns following on from this have a list of people's names, hence why a lot of the data repeats (as a number of people attended each program).

Program
Clinic Title
Start Date

[Code].....

formula that will automatically give me that answer?

View 2 Replies View Related

Countif Function For Counting Values Based On More Then 1 Variable

May 7, 2007

I'm trying to make a spreadsheet that will count the number of times a certain incident occurs, for a particular person, for a particular month. The attached spreadsheet is an example of what I need done.

For the attached spreadsheet, I need to find out how many times x employee has been late for x month, and how many times they've been late overall.

You can see one of the many tries I've attempted in the second sheet, but it doesn't seem to want to work. I have to be able to do this without VBA, because of signature issues.

View 9 Replies View Related

Auto-populate Combobox - Extracts Unique Distinct Values From Column

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

Pivot Table Not Counting Values (but Does Count Based On Labels)

Jan 24, 2014

I have column in my table that calculates time in hours between now and ticket open date (ticket open date in B1)
so, in C1 i have following formula:

=(now()-B1)*24

Results are in hours, such as 15, 25, 32, 65 etc

In pivot table, I would like to see how many tickets with values of less than 24 or more than 48, etc

My available columns are: Region, Ticket#, AgingOpenHr(this new column).

I tried it different ways, and I cannot get it Less Than and Greater Than work under Values, works if I select grater than or less than in Label, but label does not produce consistent numbers.

View 1 Replies View Related

Summing Up Values In Column Corresponding To Unique Distinct Values In Another Column?

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

Counting Values Of One Column Based On The Uniqueness Of Values In Another Column

Jun 11, 2014

Here is a table

Col1 Col2 Col3 Col4
8821015m14:44.0E__uMail
9266321m34:13.0E__uMail
92677165m23:43.0E__uMail
9309415m07:24.0E__uMail

[Code] .....

Here is some context

Each one of these rows represents an entry into a ticket in our incident management system. Col4 represents the method by which the incident was reported to us (Email, Voicemail, Walk In, Ask IT). A ticket can be open and closed with a single entry if the issue is easily solved or it can have many entries if the issue is complex and requires more troubleshooting or escalation to a higher tier of support. I need to determine the number of unique tickets submitted by each reporting avenue (Email, Voicemail, Walk In, Ask IT).

In this table the number of tickets that were:

submitted via Email is 14
submitted via Voicemail is 1
submitted via Walk In is 2
submitted via Ask IT is 1

Col1 Col2 Col3 Col4
8821015m14:44.0E__uMail = 1
9266321m34:13.0E__uMail = 2
92677165m23:43.0E__uMail = 3
9309415m07:24.0E__uMail = 4

[Code] ....

What I need is a formula that will produce this result.

View 5 Replies View Related

Counting Matching Values In Two Separate Ranges Without Counting Duplicates?

Jan 1, 2014

I cannot get various formulas (Countif, Match, Frequency, Etc) to work properly.

I am trying to arrive at a total number of matches of numbers in cell range B1:G1 with any numbers entered into the cell range of K1:P11 and have the total of matches display in cell H1.
However I do not want to count duplicate numbers from the K1:P11 cells. (if the number 5 in posted in K1:P11 multiple times I only need it reported once in H1)

B1:G1 is the constant and the numbers will not change - K1:P11 cells will be populated by adding numbers until the all the numbers in B1:G1 is completed and match.

Range
B1 C1 D1 E1 F1 G1
2 7 19 45 22 13

H1 Total of matching numbers in cell range K1:P11

View 3 Replies View Related

Excel 2010 :: Count Distinct Text Values In One Column If Another Column Equals A Value

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

Formula For Getting Average Of Values Without Counting Zero Values In Range?

Dec 23, 2011

Is there a formula that would allow you to take the average of all values within a range but not count the zero values? I thought something like this might work but it's not. Neither one worked.

=AVERAGEIF($E$4:$E$34,">0")
=AVERAGEIF(E4:E34,">0")

View 9 Replies View Related

Counting Duplicate Values With Repeated Text Values

Jan 25, 2004

I have a collumn with lots of different text values some repeated. how can i count all these values so that it only counts each value once.

e.g

if in cell A1 i have = "apples"
and in cell A2 i have "apples"
and in cell A3 i have "Pear"

View 9 Replies View Related

Counting Values In VBA

Mar 5, 2014

I'm trying to display a 2-column table that tells me the number of games broadcasted by each channel. The code has to figure out the channel name itself, without me specifying the channel name in it. How can I do this in VBA?

Game1 NBC
Game2 CBS
Game3 CBS
Game4 CBS
Game5 FOX
Game6 CBS
Game7 FOX
Game8 FOX
Game9 FOX
Game10 NBC
Game11 ESPN
Game12 NFL Network
Game13 FOX
Game14 CBS

View 3 Replies View Related

Counting Certain Values

Jul 11, 2008

if i want a cell to count certain value in a range what formula o set, i know that CountA function counts cells with words in them but it counts everything, i want a certain word(s) to be counted.

for example i have...

New
Old
Take Over

and i want C11 to count 'New' in range of B12:B20 .

how to?

and 2nd how to Name the Columns, i mean Instead of regular A,B,C how to set a name or title for them...
and how to keep them on top, i mean as i scroll down columns keeps there only sheets scrolls up and down so i can see given Column Names/heads.

View 14 Replies View Related

Counting Values Within Cell?

Jun 20, 2014

I have a cell, say C74. In the cell contains 416 values are four & five digit numbers separated by a comma and a space. (example: 21160, 21161, 21250, 21340, 21440, 2155, 21650, 21651, 21740, 21741, 2185, 21940, 2253, 2254, 2440, 26160, 26250, 26293, 26323, 26350, 2636)

So I'm trying to write a formula to count all values with in the cell.

Answer should be "21"

View 5 Replies View Related

Counting The Same Values In Two Columns?

Jun 27, 2014

I am trying to count how many times a certain value appears in a column. For example how mnay times A81001 appears in column A and compare with column B. I suppose it's Count function?

column A column B
A81001A81001
A81001A81001
A81002A81002
A81002A81002
A81002A81002
A81002A81002
A81002A81002
A81003A81003
A81003A81003
A81003A81004
A81004A81004
A81004A81004
A81004A81004
A81004A81005

View 12 Replies View Related

Counting Repeat Values

Dec 10, 2013

I'm putting a presentation together for work regarding false alarms and I'd like to count how many alarms have gone off at certain locations and I'm wondering if there is a formula that will accomplish this. I've attached a pic of a spreadsheet containing the data to be used. On the left side, there is a table labeled "Alarms" with columns displaying the dates, street numbers and street names. On the right side of the spreadsheet, there is a table labeled "Activations", which will be used to display the amount of single, double, triple, etc. activations.

For example, using the data, the alarm at "2 Red Oak Row" has gone off 3 times and since there are no other addresses where this has happened, a "1" would be displayed under the box labeled "3" in "Activations". Since the alarm at "4 Winding Way" and the one at "23 Blackberry Lane" have both gone off twice, a "2" would be displayed under the box labeled "2" in "Activations". The same would hold for addresses where the alarm has gone off 3 times, 4 times, 5 times, so on and so forth. In addition, if an alarm has gone off 10 or more times at any residence, the first 10 activations and any subsequent activations would be counted as a "1".

For example, if there is one case where an alarm at a certain residence has gone off 10 times (or more), a "1" would be displayed under box 10. If another residence's alarm also went off 10 times (or more), a "2" would be displayed under box "10".

View 5 Replies View Related







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