Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jeffc
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank


This one's got me stumped so any help would be appreciated.

Here's the problem, I've got one column with names in it and a second
column with dates in it. What I'm trying to do is generate a count in a
third column next to each name with the number of times the name appears
in the name column when there is a date in the corresponding date
column. If the date column is blank I want the count column to remain
blank.

For example:

Assigned To: Number Completed Date
Joe 2 1/1/06
Jane
Joe 2 2/22/06


I know that there will be repeated info but the end user doesn't care.


Thanks
Jeff


--
jeffc
------------------------------------------------------------------------
jeffc's Profile: http://www.excelforum.com/member.php...o&userid=33452
View this thread: http://www.excelforum.com/showthread...hreadid=532621

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank

=SUMPRODUCT(--($A$2:$A$200=A1),--($C$2:$C$200<""))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"jeffc" wrote in
message ...

This one's got me stumped so any help would be appreciated.

Here's the problem, I've got one column with names in it and a second
column with dates in it. What I'm trying to do is generate a count in a
third column next to each name with the number of times the name appears
in the name column when there is a date in the corresponding date
column. If the date column is blank I want the count column to remain
blank.

For example:

Assigned To: Number Completed Date
Joe 2 1/1/06
Jane
Joe 2 2/22/06


I know that there will be repeated info but the end user doesn't care.


Thanks
Jeff


--
jeffc
------------------------------------------------------------------------
jeffc's Profile:

http://www.excelforum.com/member.php...o&userid=33452
View this thread: http://www.excelforum.com/showthread...hreadid=532621



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank

this modified formula should work a little better.

=IF(C1<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$1:$C$200<"")),"")



"Bob Phillips" wrote:

=SUMPRODUCT(--($A$2:$A$200=A1),--($C$2:$C$200<""))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"jeffc" wrote in
message ...

This one's got me stumped so any help would be appreciated.

Here's the problem, I've got one column with names in it and a second
column with dates in it. What I'm trying to do is generate a count in a
third column next to each name with the number of times the name appears
in the name column when there is a date in the corresponding date
column. If the date column is blank I want the count column to remain
blank.

For example:

Assigned To: Number Completed Date
Joe 2 1/1/06
Jane
Joe 2 2/22/06


I know that there will be repeated info but the end user doesn't care.


Thanks
Jeff


--
jeffc
------------------------------------------------------------------------
jeffc's Profile:

http://www.excelforum.com/member.php...o&userid=33452
View this thread: http://www.excelforum.com/showthread...hreadid=532621




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank

I'd think it would give an error, since the ranges aren't the same size.

Why check the "Date" label? Won't it always be <""?

In article ,
Sloth wrote:

this modified formula should work a little better.

=IF(C1<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$1:$C$200<"")),"")

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank

oops, that's what I get for rushing, sorry about that. The point I was
trying to make was
1) change the A1 to A2, since the first formula will first be pasted in B2.
2) Add the conditional statement because according to how I understood the
question, only the completed ones will have a date next to it. In the
example next to Jane is nothing, not 0. And if Jane had other rows that had
dates, there would incorrectly be a number next to it in the formula as
originaly posted.

=IF(C2<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$2:$C$200<"")),"")



"JE McGimpsey" wrote:

I'd think it would give an error, since the ranges aren't the same size.

Why check the "Date" label? Won't it always be <""?

In article ,
Sloth wrote:

this modified formula should work a little better.

=IF(C1<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$1:$C$200<"")),"")




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank

Errors apart, it seems a bit redundant to explicitly test for C being blank
and then do so again in the SP part. If you do that test, COUNTIF would be
somewhat better.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Sloth" wrote in message
...
this modified formula should work a little better.

=IF(C1<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$1:$C$200<"")),"")



"Bob Phillips" wrote:

=SUMPRODUCT(--($A$2:$A$200=A1),--($C$2:$C$200<""))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"jeffc" wrote in
message ...

This one's got me stumped so any help would be appreciated.

Here's the problem, I've got one column with names in it and a second
column with dates in it. What I'm trying to do is generate a count in

a
third column next to each name with the number of times the name

appears
in the name column when there is a date in the corresponding date
column. If the date column is blank I want the count column to remain
blank.

For example:

Assigned To: Number Completed Date
Joe 2 1/1/06
Jane
Joe 2 2/22/06


I know that there will be repeated info but the end user doesn't care.


Thanks
Jeff


--
jeffc


------------------------------------------------------------------------
jeffc's Profile:

http://www.excelforum.com/member.php...o&userid=33452
View this thread:

http://www.excelforum.com/showthread...hreadid=532621






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank

Example

Your formula results:
Assigned To: Number Completed Date
Joe 2 1/1/06
Jane 1
Joe 2 2/22/06
Jane 1 3/12/06
Jim 0

My formula (with errors fixed) results:
Assigned To: Number Completed Date
Joe 2 1/1/06
Jane
Joe 2 2/22/06
Jane 1 3/12/06
Jim

This is what I thought the OP wanted, so I thought it might be slightly more
appropriate.



"Bob Phillips" wrote:

Errors apart, it seems a bit redundant to explicitly test for C being blank
and then do so again in the SP part. If you do that test, COUNTIF would be
somewhat better.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Sloth" wrote in message
...
this modified formula should work a little better.

=IF(C1<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$1:$C$200<"")),"")



"Bob Phillips" wrote:

=SUMPRODUCT(--($A$2:$A$200=A1),--($C$2:$C$200<""))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"jeffc" wrote in
message ...

This one's got me stumped so any help would be appreciated.

Here's the problem, I've got one column with names in it and a second
column with dates in it. What I'm trying to do is generate a count in

a
third column next to each name with the number of times the name

appears
in the name column when there is a date in the corresponding date
column. If the date column is blank I want the count column to remain
blank.

For example:

Assigned To: Number Completed Date
Joe 2 1/1/06
Jane
Joe 2 2/22/06


I know that there will be repeated info but the end user doesn't care.


Thanks
Jeff


--
jeffc

------------------------------------------------------------------------
jeffc's Profile:
http://www.excelforum.com/member.php...o&userid=33452
View this thread:

http://www.excelforum.com/showthread...hreadid=532621







  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jeffc
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank


Sloth,

This did it. Excellent!

Now, if you feel like answering one more question. What function do
the -- serve.

Thanks for the help.

Jeff


Sloth Wrote:
oops, that's what I get for rushing, sorry about that. The point I was
trying to make was
1) change the A1 to A2, since the first formula will first be pasted
in B2.
2) Add the conditional statement because according to how I understood
the
question, only the completed ones will have a date next to it. In the
example next to Jane is nothing, not 0. And if Jane had other rows
that had
dates, there would incorrectly be a number next to it in the formula
as
originaly posted.

=IF(C2<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$2:$C$200<"")),"")



"JE McGimpsey" wrote:

I'd think it would give an error, since the ranges aren't the same

size.

Why check the "Date" label? Won't it always be <""?

In article ,
Sloth wrote:

this modified formula should work a little better.

=IF(C1<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$1:$C$200<"")),"")




--
jeffc
------------------------------------------------------------------------
jeffc's Profile: http://www.excelforum.com/member.php...o&userid=33452
View this thread: http://www.excelforum.com/showthread...hreadid=532621

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jeffc
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank


Thanks to everyone who helped out on this.

Now I can get some sleep tonight! ;)

Jeff


--
jeffc
------------------------------------------------------------------------
jeffc's Profile: http://www.excelforum.com/member.php...o&userid=33452
View this thread: http://www.excelforum.com/showthread...hreadid=532621

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Count Names in One Col if 2nd Col Isn't Blank

See http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed
explanation.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"jeffc" wrote in message
...

Sloth,

This did it. Excellent!

Now, if you feel like answering one more question. What function do
the -- serve.

Thanks for the help.

Jeff


Sloth Wrote:
oops, that's what I get for rushing, sorry about that. The point I was
trying to make was
1) change the A1 to A2, since the first formula will first be pasted
in B2.
2) Add the conditional statement because according to how I understood
the
question, only the completed ones will have a date next to it. In the
example next to Jane is nothing, not 0. And if Jane had other rows
that had
dates, there would incorrectly be a number next to it in the formula
as
originaly posted.

=IF(C2<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$2:$C$200<"")),"")



"JE McGimpsey" wrote:

I'd think it would give an error, since the ranges aren't the same

size.

Why check the "Date" label? Won't it always be <""?

In article ,
Sloth wrote:

this modified formula should work a little better.

=IF(C1<"",SUMPRODUCT(--($A$2:$A$200=A2),--($C$1:$C$200<"")),"")




--
jeffc
------------------------------------------------------------------------
jeffc's Profile:

http://www.excelforum.com/member.php...o&userid=33452
View this thread: http://www.excelforum.com/showthread...hreadid=532621



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
How do I count distinct names? Rona Excel Worksheet Functions 8 March 9th 06 02:22 AM
count of (blank) pivot table Jtspeakman Excel Discussion (Misc queries) 1 December 12th 05 03:17 PM
How do I count different names in a colum ie: 4 mikes 3 toms dallyup2 Excel Discussion (Misc queries) 4 November 24th 05 10:25 PM
Count Non Blank in column Diane Alsing Excel Discussion (Misc queries) 3 September 16th 05 03:12 AM
count non blank cells which meet criteria in another column cmarsh5035 Excel Worksheet Functions 2 February 16th 05 04:32 PM


All times are GMT +1. The time now is 02:23 PM.

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"