![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I have a list of numbers. Some numbers are the same. I want to count how many numbers are in the list. But I don't want to count the same number more than once.
For instance: 1, 67, 4, 32, 4, 3 Should count: 5 The four only gets counted once. Any help would be greatly appreciated. Thanks |
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
where A1:A10 houses the target numbers. |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
1. If you want to specify the specific range for the data (revise to fit your info) =SUMPRODUCT(1/COUNTIF(A1:A6,A1:A6)) 2. If you want to specify a range that may include blank cells, use Array formulas such as the following: a) =SUM(IF(LEN(rData),1/COUNTIF(rData,rData))) b) =SUM(IF(LEN(A1:A100),1/COUNTIF(A1:A100,A1:A100))) Enter the Array formulas with Ctrl-Shift-Enter (CSE) |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
=COUNT(IF(FREQUENCY(A1:A6,A1:A6),1)) |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|