Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default count if using columns not range of cells

Hi,
Im trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for the month of
June.

A B
16-Jun-08 Apple
16-Jun-08 Pear
30-May-08 Apple
18-Jun-08 Orange
16-Jun-08 Apple
12-Apr-08 Pear

Thanks
--
Opal
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default count if using columns not range of cells

=SUMPRODUCT(--(TEXT(A1:A100,"mmmyy")="Jun08"),--(B1:B100="Apple"))


"Opal" wrote:

Hi,
Im trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for the month of
June.

A B
16-Jun-08 Apple
16-Jun-08 Pear
30-May-08 Apple
18-Jun-08 Orange
16-Jun-08 Apple
12-Apr-08 Pear

Thanks
--
Opal

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default count if using columns not range of cells

=SUMPRODUCT(--(TEXT(A1:A100,"yyyymmm")="2008Jun"),--(B1:B100="Apple"))

--
__________________________________
HTH

Bob

"Opal" wrote in message
...
Hi,
Im trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for the month
of
June.

A B
16-Jun-08 Apple
16-Jun-08 Pear
30-May-08 Apple
18-Jun-08 Orange
16-Jun-08 Apple
12-Apr-08 Pear

Thanks
--
Opal



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default count if using columns not range of cells

One way, assuming data in cols A and B expected within rows 2 to 10
In say, C2, copied down:
=IF(A2="","",SUMPRODUCT((TEXT(A$2:A$10,"mmmyy")="J un08")*(B$2:B$10=B2)))
Adapt ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Opal" wrote:
Im trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for the month of
June.

A B
16-Jun-08 Apple
16-Jun-08 Pear
30-May-08 Apple
18-Jun-08 Orange
16-Jun-08 Apple
12-Apr-08 Pear

Thanks
--
Opal

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default count if using columns not range of cells

Thanks so much "Teethless Mama"!

Only thing was my comp wasnt recognising ur commas. I had to change them to
semicolons. Thanks again!
--
Opal


"Teethless mama" wrote:

=SUMPRODUCT(--(TEXT(A1:A100,"mmmyy")="Jun08"),--(B1:B100="Apple"))


"Opal" wrote:

Hi,
Im trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for the month of
June.

A B
16-Jun-08 Apple
16-Jun-08 Pear
30-May-08 Apple
18-Jun-08 Orange
16-Jun-08 Apple
12-Apr-08 Pear

Thanks
--
Opal



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default count if using columns not range of cells

And what if you wanted those between April 15 and May 15?

"Bob Phillips" wrote:

=SUMPRODUCT(--(TEXT(A1:A100,"yyyymmm")="2008Jun"),--(B1:B100="Apple"))

--
__________________________________
HTH

Bob

"Opal" wrote in message
...
Hi,
Im trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for the month
of
June.

A B
16-Jun-08 Apple
16-Jun-08 Pear
30-May-08 Apple
18-Jun-08 Orange
16-Jun-08 Apple
12-Apr-08 Pear

Thanks
--
Opal




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default count if using columns not range of cells

=SUMPRODUCT(--(A1:A100=--"2008-04-15"),--(A1:A100<--"2008-05-15"),--(B1:B100="Apple"))--__________________________________HTHBob"Bigfoot17 " wrote in ... And what if you wanted those between April 15 and May 15? "Bob Phillips" wrote: =SUMPRODUCT(--(TEXT(A1:A100,"yyyymmm")="2008Jun"),--(B1:B100="Apple")) -- __________________________________ HTH Bob "Opal" wrote in message ... Hi, Im trying to generate a count that will tell me how many of 'x' are in column B only if column A's data are within a date range eg for themonth of June. A B 16-Jun-08 Apple 16-Jun-08 Pear 30-May-08 Apple 18-Jun-08 Orange 16-Jun-08 Apple 12-Apr-08 Pear Thanks -- Opal

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default count if using columns not range of cells

Whoa! What happened there

=SUMPRODUCT(--(A1:A100=--"2008-04-15"),--(A1:A100<--"2008-05-15"),--(B1:B100="Apple"))


--
__________________________________
HTH

Bob

"Bob Phillips" wrote in message
...
=SUMPRODUCT(--(A1:A100=--"2008-04-15"),--(A1:A100<--"2008-05-15"),--(B1:B100="Apple"))--__________________________________HTHBob"Bigfoot17 "
wrote in
... And
what if you wanted those between April 15 and May 15? "Bob Phillips"
wrote:
=SUMPRODUCT(--(TEXT(A1:A100,"yyyymmm")="2008Jun"),--(B1:B100="Apple"))
-- __________________________________ HTH Bob "Opal"
wrote in message
... Hi, Im
trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for themonth
of June. A B 16-Jun-08 Apple 16-Jun-08

Pear 30-May-08 Apple 18-Jun-08 Orange 16-Jun-08 Apple
12-Apr-08 Pear Thanks -- Opal



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 Certain Cells in Specified Range Xavier Excel Worksheet Functions 3 July 25th 06 10:25 PM
count cells in a range fullers Excel Worksheet Functions 2 November 30th 05 01:36 PM
count all the columns in a range with certain conditions hopeace Excel Discussion (Misc queries) 3 October 18th 05 08:38 PM
Count occurances in range of cells Ed Gregory Excel Worksheet Functions 1 September 7th 05 04:12 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM


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