PC Review


Reply
Thread Tools Rate Thread

Count unique values in one column if values in corresponding columnare null?

 
 
allie357
Guest
Posts: n/a
 
      6th Dec 2008
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(D23130)>0,MATCH(D23130,D23130,0),""), IF
(LEN(D23130)>0,MATCH(D23130,D23130,0),""))>0,1))
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      7th Dec 2008
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=""),D13130),D13130)>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(D13130,D13130&"")*(D13130>0))

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(D23130)>0,MATCH(D23130,D23130,0),""), IF
> (LEN(D23130)>0,MATCH(D23130,D23130,0),""))>0,1))
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
count unique values in one column for a set value in another col. Jean-Luc Microsoft Excel Worksheet Functions 2 8th Feb 2010 04:39 PM
count number of unique values in column Joe Microsoft Excel Worksheet Functions 8 5th Mar 2009 02:33 PM
count of unique values within a column =?Utf-8?B?SmFzb24=?= Microsoft Excel Misc 7 5th Jul 2007 07:00 PM
How do i count the number of unique values in a given column? =?Utf-8?B?Qm9iYnk=?= Microsoft Excel Misc 8 1st Sep 2006 06:43 PM
Is it possible to set a unique constraint on a dataset column but still allow null values? Tim Frawley Microsoft VB .NET 4 22nd Mar 2004 01:04 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:36 PM.