LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kent (thanks)
 
Posts: n/a
Default Using sum(1/countif....) not returning expected result

I have a spreadsheet where I am trying to count the number of unique values
in Column A, based on set criteria in Column B. I have searched all over the
internet and the most popular solution seems to be the formula below. For
examples purposes assume the following:
A B
1 X
2 Y
2 X
3 Y
3 Y
4 X
4 X
4 X

I use the following array formula to count the number of unique numbers in
column A, based on (X) in column B.

=SUM(1/COUNTIF(A1:A8,A1:A8)*(B1:B8="x"))

I would expect the result to be 3, but instead I get 2.5

Any suggestions on how to correct my formula? My actual spreadsheet
includes both numeric and alpha fields that need to be counted, but no blank
spaces.

Thanks in advance for your assistance,




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"1235" appears as "One thousand two hundred thirty five" H. Kan Excel Discussion (Misc queries) 11 December 8th 06 07:56 PM
Adding "and" to Spellnumber code Ken G. Excel Discussion (Misc queries) 10 July 22nd 06 12:53 PM
EXCEL:NUMBER TO GREEK WORDS vag Excel Worksheet Functions 1 June 15th 05 05:57 PM
Amount or Numbers in Words ron New Users to Excel 6 December 24th 04 07:32 PM
Spellnumber Norman Jones Excel Worksheet Functions 6 December 13th 04 07:21 AM


All times are GMT +1. The time now is 04:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"