Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() I need help in getting excel to count the number of different number values in a specified range of cells across a row. example: 1 1 2 should return 2 0 1 2 should return 3 2 2 2 should return 0 Can anyone help? thanks. -- chiapas77 ------------------------------------------------------------------------ chiapas77's Profile: http://www.excelforum.com/member.php...o&userid=30568 View this thread: http://www.excelforum.com/showthread...hreadid=518894 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I took an array formula that I've seen used for getting unique numbers and
made a slight change to it so that if there was only one unique item, it would return 0. Worked on your test data. =IF(SUM(1/COUNTIF(A2:C2,A2:C2))=1,0,SUM(1/COUNTIF(A2:C2,A2:C2))) Enter with cntl-shift-enter, not just enter. -- Kevin Vaughn "chiapas77" wrote: I need help in getting excel to count the number of different number values in a specified range of cells across a row. example: 1 1 2 should return 2 0 1 2 should return 3 2 2 2 should return 0 Can anyone help? thanks. -- chiapas77 ------------------------------------------------------------------------ chiapas77's Profile: http://www.excelforum.com/member.php...o&userid=30568 View this thread: http://www.excelforum.com/showthread...hreadid=518894 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi chiapas,
Please don't ask the same question on more than one forum. People working on your problem are wasting their time if you have already got the answer from another forum. Some of these people find that very annoying. Ken Johnson |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Fri, 3 Mar 2006 15:56:33 -0600, chiapas77
wrote: I need help in getting excel to count the number of different number values in a specified range of cells across a row. example: 1 1 2 should return 2 0 1 2 should return 3 2 2 2 should return 0 Can anyone help? thanks. I don't quite understand why 2,2,2 should return 0. Logic suggests it should perhaps be 1 From a suggestion by Bob Philips several months ago. =SUMPRODUCT((A1:E1<"")/COUNTIF(A1:E1,A1:E1&"")) Just change the A:E range to cover the number of columns in your rows. If you really want a 2,2,2 type row to show 0 rather than 1 then you probably need to wrap it all in an If(Fn=1,0,Fn) construction. HTH Richard Buttrey __ |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() I apologize for the double post... Thanks Kevin and Richard for your help... actually you are right Richard... 2,2,2 would return 1 and it's ok. This help really got me out of a jam. saul. -- chiapas77 ------------------------------------------------------------------------ chiapas77's Profile: http://www.excelforum.com/member.php...o&userid=30568 View this thread: http://www.excelforum.com/showthread...hreadid=518894 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional counting with Excel | Excel Worksheet Functions | |||
Counting rows, then counting values. | Excel Discussion (Misc queries) | |||
Counting names in a column but counting duplicate names once | Excel Discussion (Misc queries) | |||
Counting... | Excel Worksheet Functions | |||
counting Multiple answers in 1 cell + column | Excel Discussion (Misc queries) |