Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Fun with COUNT and AND functions.

Okay... i'm trying to count the amount of times 2 different values appear in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Fun with COUNT and AND functions.

Try one of these:

=SUMPRODUCT((B10:B100="B")*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100="B"),--(C10:C100="toronto"))

Adjust range references to suit your situation
(SUMPRODUCT doesn't work on entire columns)

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Fun with COUNT and AND functions.

Darn...I typed B's instead of 4's:

Here're the corrected versions:

=SUMPRODUCT((B10:B100=4)*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100=4),--(C10:C100="toronto"))

Again...Adjust range references to suit your situation
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Fun with COUNT and AND functions.

Try this:

=SUMPRODUCT(--(B1:B20=4),--(C1:C20="toronto"))

Adjust your range as needed.

HTH,
Paul

--

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Fun with COUNT and AND functions.

Is there any way to add wildcard values to this formula? it may be maditory
for what i need to do.

"Ron Coderre" wrote:

Darn...I typed B's instead of 4's:

Here're the corrected versions:

=SUMPRODUCT((B10:B100=4)*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100=4),--(C10:C100="toronto"))

Again...Adjust range references to suit your situation
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Fun with COUNT and AND functions.

also, it may be linked to a different sheet within the same file.

"Ron Coderre" wrote:

Darn...I typed B's instead of 4's:

Here're the corrected versions:

=SUMPRODUCT((B10:B100=4)*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100=4),--(C10:C100="toronto"))

Again...Adjust range references to suit your situation
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Fun with COUNT and AND functions.

Perhaps this:
=SUMPRODUCT((B10:B100=4)*ISNUMBER(SEARCH("toronto" ,C10:C100)))

If you're referencing another sheet...try this version:
=SUMPRODUCT(('Sheet 01'!B10:B100=4)*ISNUMBER(SEARCH("toronto",'Sheet
01'!C10:C100)))

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
"Johosh" wrote in message
...
Is there any way to add wildcard values to this formula? it may be
maditory
for what i need to do.

"Ron Coderre" wrote:

Darn...I typed B's instead of 4's:

Here're the corrected versions:

=SUMPRODUCT((B10:B100=4)*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100=4),--(C10:C100="toronto"))

Again...Adjust range references to suit your situation
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values
appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Fun with COUNT and AND functions.

That is EXACTLY what i need!

Thanks a lot!

"Ron Coderre" wrote:

Perhaps this:
=SUMPRODUCT((B10:B100=4)*ISNUMBER(SEARCH("toronto" ,C10:C100)))

If you're referencing another sheet...try this version:
=SUMPRODUCT(('Sheet 01'!B10:B100=4)*ISNUMBER(SEARCH("toronto",'Sheet
01'!C10:C100)))

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
"Johosh" wrote in message
...
Is there any way to add wildcard values to this formula? it may be
maditory
for what i need to do.

"Ron Coderre" wrote:

Darn...I typed B's instead of 4's:

Here're the corrected versions:

=SUMPRODUCT((B10:B100=4)*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100=4),--(C10:C100="toronto"))

Again...Adjust range references to suit your situation
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values
appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Fun with COUNT and AND functions.

I'm glad I could help!....thanks for letting me know.

***********
Regards,
Ron

XL2003, WinXP


"Johosh" wrote:

That is EXACTLY what i need!

Thanks a lot!

"Ron Coderre" wrote:

Perhaps this:
=SUMPRODUCT((B10:B100=4)*ISNUMBER(SEARCH("toronto" ,C10:C100)))

If you're referencing another sheet...try this version:
=SUMPRODUCT(('Sheet 01'!B10:B100=4)*ISNUMBER(SEARCH("toronto",'Sheet
01'!C10:C100)))

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
"Johosh" wrote in message
...
Is there any way to add wildcard values to this formula? it may be
maditory
for what i need to do.

"Ron Coderre" wrote:

Darn...I typed B's instead of 4's:

Here're the corrected versions:

=SUMPRODUCT((B10:B100=4)*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100=4),--(C10:C100="toronto"))

Again...Adjust range references to suit your situation
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Johosh" wrote in message
...
Okay... i'm trying to count the amount of times 2 different values
appear
in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?






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
functions to count Yes & No fofo Excel Worksheet Functions 4 June 13th 06 11:00 PM
Combining IF and Count functions SE Excel Discussion (Misc queries) 6 October 13th 05 10:19 PM
Advanced Count functions Ben Blair Excel Discussion (Misc queries) 4 May 26th 05 03:02 PM
Excel IF and COUNT functions Robin Faulkner Excel Worksheet Functions 2 February 18th 05 06:34 PM
Using Dates in Count functions HWade Excel Worksheet Functions 1 December 6th 04 10:25 PM


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