Forums

General Betting

Welcome to Live View – Take the tour to learn more
Start Tour
There is currently 1 person viewing this thread.
swift-tuttle
17 Jul 12 10:08
Joined:
Date Joined: 22 Mar 04
| Topic/replies: 27,747 | Blogger: swift-tuttle's blog
I have a spreadsheet with a number of columns. In one of the columns there are a number of values, some of which are the same.

There are several thousand rows on the spreadsheet.

Is there a function to count how many different values there are in that column referred to above

e.g. the value 3071033 appears in the column about a 150 times - that would count as 1 because the value is the same
Pause • Switch to Standard View excel help please
Show More
Loading...
Report SHAPESHIFTER • July 17, 2012 10:27 AM BST
If no one comes up with a function, you can try this:

PUT ALL THE NUMBERS IN COLUMN A
LEAVE TOP LINE FOR HEADERS
so numbers start at A2

in B2, put the following formula

=IF(A3=A2,"",A2)

Cut and past this down the entire column of B

It will list all the numbers that appear ONCE.

Then, in B1, put the following:

=COUNT(B2:B1000)

Note, "B1000" in formula should be the max of A2, so if data goes to A1500, formula is

=COUNT(B2:B1500)


Now, someone will post a one cell formula.....Crazy
Report swift-tuttle • July 17, 2012 10:32 AM BST
thanks for your input shapeshifter

I've been looking at Help since I posted and I think Advanced filter is supposed to do it but i can't get it to work

so I'll try your method Happy
Report JLivermore • July 17, 2012 12:03 PM BST
It depends how you want your output.

Shapeshifters method is fine.  I think the one cell formula is:
=SUM(IF(FREQUENCY(A2:A1000,A2:A1000)>0,1))

You could also consider:
1 - Advanced filter: List range is your data range, check copy to another location and provide a range, then check unique records only.  This will give you a list of all unique values
2 - You could use pivotTable to do something similar, just put values in row headings and count of values in data
Report Compound Magic • July 17, 2012 12:19 PM BST
Try

Copy and paste this formula into a spare cell ~

=SUBTOTAL(2,AO2:AO10000) ~ that will count the list of unique values placed in column AO by the advanced filter

Now for the unique values in the advanced filter ~

Lets say all your numbers are in column B Starting at cell B2 ~ adjust if different.
Click on advanced filter,Click copy to another location,click unique records only,
List range box type B2:B10000, In the criteria range B2:B10000, in the copy to box type AO2
Report Stow_judge • July 17, 2012 12:47 PM BST
Easy in Access
Import excel spreadsheet as a table
Create query, selecting column containing numbers twice
Click on totals
Select count in second column selected
run query
Count rows

For table with a name of sheet1 with the column of numbers headed by number


SELECT Sheet1.Number, Count(Sheet1.Number) AS CountOfNumber
FROM Sheet1
GROUP BY Sheet1.Number;


I think that you can use queries in excel. Can you amend the above for excel?
Report swift-tuttle • July 17, 2012 1:02 PM BST
Thanks everyone

sorted now
Report Deltâ • July 17, 2012 1:11 PM BST
was it my PM that did it?
Report SHAPESHIFTER • July 17, 2012 1:25 PM BST
Mine was old skool Grin
Report ror • September 2, 2012 1:40 PM BST
Stick it in a database (as data should be!) and do:

SELECT COUNT(DISTINCT([field])) from [table]
Post Your Reply
<CTRL+Enter> to submit
Please login to post a reply.

Wonder

Instance ID: 13539
www.betfair.com