Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Count unique values in one column if values in corresponding columnare null?

I have 2 columns of values (numbers that contain text values). I need
to count the unique numbers in the one column if the column next to it
contains a null value.

I am using this formula to count the unique values (array formula) but
I only want it to calculate if the value in the corresponding cell is
null.
Please help.

=SUM(IF(FREQUENCY(IF(LEN(D2:D3130)0,MATCH(D2:D313 0,D2:D3130,0),""), IF
(LEN(D2:D3130)0,MATCH(D2:D3130,D2:D3130,0),""))0 ,1))
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Count unique values in one column if values in corresponding colum

Hi,

Try this which will only handle numbers in column D and count them if column
C is empty.

=SUM(1*(FREQUENCY(IF((C1:C3130=""),D1:D3130),D1:D3 130)0))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
just enter. If you do it correctly then Excel will put curly brackets around
the formula{}. You can't type these yourself. If you Edit the ranges
then you must re-enter as An array

Or this which will count both numbers and text in column D if column c is
empty

=SUMPRODUCT((C1:C3130="")/COUNTIF(D1:D3130,D1:D3130&"")*(D1:D31300))

Mike

"allie357" wrote:

I have 2 columns of values (numbers that contain text values). I need
to count the unique numbers in the one column if the column next to it
contains a null value.

I am using this formula to count the unique values (array formula) but
I only want it to calculate if the value in the corresponding cell is
null.
Please help.

=SUM(IF(FREQUENCY(IF(LEN(D2:D3130)0,MATCH(D2:D313 0,D2:D3130,0),""), IF
(LEN(D2:D3130)0,MATCH(D2:D3130,D2:D3130,0),""))0 ,1))

Reply
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
count unique values in one column for a set value in another col. Jean-Luc[_2_] Excel Worksheet Functions 2 February 8th 10 04:39 PM
Count Unique Values in 1 Column based on Date Range in another Column Brian Excel Worksheet Functions 14 May 17th 09 02:58 PM
count number of unique values in column Joe Excel Worksheet Functions 8 March 5th 09 02:33 PM
count of unique values within a column Jason Excel Discussion (Misc queries) 7 July 5th 07 07:00 PM
How do i count the number of unique values in a given column? Bobby Excel Discussion (Misc queries) 8 September 1st 06 06:43 PM


All times are GMT +1. The time now is 07:06 PM.

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

About Us

"It's about Microsoft Excel"