Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Count If Multiple Criteria is Met

Hello...

Could someone please tell me the easiest way to basically do the
following?

"If Cell A1 and Cell B1 both contain something, then count... If both,
or one of the Cells is blank, then ignore."

So basically...
A1 B1
x x
x
x
------------

I would like my formula cell to return a value of 1...

Thanks for any help!!!!

Stacy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count If Multiple Criteria is Met

=SUMPRODUCT(--(A1:A10<""),--(B1:B10<""))

--
Regards,
Tom Ogilvy

"stacy" wrote in message
oups.com...
Hello...

Could someone please tell me the easiest way to basically do the
following?

"If Cell A1 and Cell B1 both contain something, then count... If both,
or one of the Cells is blank, then ignore."

So basically...
A1 B1
x x
x
x
------------

I would like my formula cell to return a value of 1...

Thanks for any help!!!!

Stacy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Count If Multiple Criteria is Met

=if(counta(a1:b1)=2,"both","not both")
or
=if(counta(a1:b1)=2,1,0)


stacy wrote:

Hello...

Could someone please tell me the easiest way to basically do the
following?

"If Cell A1 and Cell B1 both contain something, then count... If both,
or one of the Cells is blank, then ignore."

So basically...
A1 B1
x x
x
x
------------

I would like my formula cell to return a value of 1...

Thanks for any help!!!!

Stacy


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Count If Multiple Criteria is Met

Okay, that works perfectly... Now what if I have a range to look at?
Like A1:A500, and B1:B500? In Cell C1 I would like one value, telling
me how many total rows, from 1 to 500, have something in both the A and
B columns? Is this possible or would I have to replicate the numeric
value, like in your formula, and then go back and "count" all the 1's
for my total?

A1 B1 C1
x x 3
x
x x
x
x x
x

C1=3 being the number of "true" rows that have data in both columns...

Thanks again for any clarification... I appreciate it!!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Count If Multiple Criteria is Met

Stacy,

Tom already gave you that:

=SUMPRODUCT(--(A1:A500<""),--(B1:B500<""))


--
steveB

Remove "AYN" from email to respond
"stacy" wrote in message
oups.com...
Okay, that works perfectly... Now what if I have a range to look at?
Like A1:A500, and B1:B500? In Cell C1 I would like one value, telling
me how many total rows, from 1 to 500, have something in both the A and
B columns? Is this possible or would I have to replicate the numeric
value, like in your formula, and then go back and "count" all the 1's
for my total?

A1 B1 C1
x x 3
x
x x
x
x x
x

C1=3 being the number of "true" rows that have data in both columns...

Thanks again for any clarification... I appreciate it!!





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count If Multiple Criteria is Met

Just as previously stated:

=SUMPRODUCT(--(A1:A500<""),--(B1:B500<""))

--
Regards,
Tom Ogilvy

"stacy" wrote in message
oups.com...
Okay, that works perfectly... Now what if I have a range to look at?
Like A1:A500, and B1:B500? In Cell C1 I would like one value, telling
me how many total rows, from 1 to 500, have something in both the A and
B columns? Is this possible or would I have to replicate the numeric
value, like in your formula, and then go back and "count" all the 1's
for my total?

A1 B1 C1
x x 3
x
x x
x
x x
x

C1=3 being the number of "true" rows that have data in both columns...

Thanks again for any clarification... I appreciate it!!



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Count If Multiple Criteria is Met

Lady, you must be psychic.

Moe.


Tom Ogilvy wrote:

Just as previously stated:

=SUMPRODUCT(--(A1:A500<""),--(B1:B500<""))

--
Regards,
Tom Ogilvy

"stacy" wrote in message
oups.com...
Okay, that works perfectly... Now what if I have a range to look at?
Like A1:A500, and B1:B500? In Cell C1 I would like one value, telling
me how many total rows, from 1 to 500, have something in both the A and
B columns? Is this possible or would I have to replicate the numeric
value, like in your formula, and then go back and "count" all the 1's
for my total?

A1 B1 C1
x x 3
x
x x
x
x x
x

C1=3 being the number of "true" rows that have data in both columns...

Thanks again for any clarification... I appreciate it!!


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count If Multiple Criteria is Met

Naw, I thought the original question was always for a multiple row range.
So if I were Moe and you were Larry or Curly, some pain would be called for
at this point <g


--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
Lady, you must be psychic.

Moe.


Tom Ogilvy wrote:

Just as previously stated:

=SUMPRODUCT(--(A1:A500<""),--(B1:B500<""))

--
Regards,
Tom Ogilvy

"stacy" wrote in message
oups.com...
Okay, that works perfectly... Now what if I have a range to look at?
Like A1:A500, and B1:B500? In Cell C1 I would like one value, telling
me how many total rows, from 1 to 500, have something in both the A

and
B columns? Is this possible or would I have to replicate the numeric
value, like in your formula, and then go back and "count" all the 1's
for my total?

A1 B1 C1
x x 3
x
x x
x
x x
x

C1=3 being the number of "true" rows that have data in both columns...

Thanks again for any clarification... I appreciate it!!


--

Dave Peterson



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Count If Multiple Criteria is Met

nyuk, nyuk, nyuk.

(or sounds to that effect.)

Tom Ogilvy wrote:

Naw, I thought the original question was always for a multiple row range.
So if I were Moe and you were Larry or Curly, some pain would be called for
at this point <g

--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
Lady, you must be psychic.

Moe.


Tom Ogilvy wrote:

Just as previously stated:

=SUMPRODUCT(--(A1:A500<""),--(B1:B500<""))

--
Regards,
Tom Ogilvy

"stacy" wrote in message
oups.com...
Okay, that works perfectly... Now what if I have a range to look at?
Like A1:A500, and B1:B500? In Cell C1 I would like one value, telling
me how many total rows, from 1 to 500, have something in both the A

and
B columns? Is this possible or would I have to replicate the numeric
value, like in your formula, and then go back and "count" all the 1's
for my total?

A1 B1 C1
x x 3
x
x x
x
x x
x

C1=3 being the number of "true" rows that have data in both columns...

Thanks again for any clarification... I appreciate it!!


--

Dave Peterson


--

Dave Peterson
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 with multiple criteria in multiple cells Mike H Excel Worksheet Functions 1 February 9th 10 04:02 PM
Filter Multiple Columns on Multiple Criteria and count the last co LBitler Excel Worksheet Functions 2 February 12th 09 08:36 PM
To count the data using multiple criteria in multiple columns Rajesh New Users to Excel 5 December 15th 08 04:07 PM
Count multiple cells against multiple criteria in an Excel spreads EricB Excel Worksheet Functions 7 June 3rd 08 09:09 PM
Multiple Criteria, Count If, Sum Product to get count across range Jonathan Excel Worksheet Functions 5 January 9th 08 11:32 PM


All times are GMT +1. The time now is 12:12 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"