Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
javamom
 
Posts: n/a
Default Count items when specific text and date criteria are met

Trying to summarize survey data and need to report the number of
specific text responses given before a date and report those given
on/after a date. The date and response information is contained in one
worksheet while the summary is displayed in another worksheet within
the same workbook (Excel 2000, Win XP). I've named the data ranges in
an attempt to make this easier. For example:

"TDate" "TQ7"
10/11/2004 q7= very easy
11/12/2005 q7= fairly easy
12/14/2004 q7= difficult

I'm trying this formula to get a count of all the question 7 responses
on/after the date:
=SUMPRODUCT(("Tdate"=DATEVALUE("01/25/2005"))*("TQ7"<""))

I'm trying this formula to count specific responses by date:
=SUMPRODUCT(("Tdate"=DATEVALUE("01/25/2005"))*(COUNTIF(TQ7,"*very
easy"))

To make things even stranger, I've "created" the date for "TDate" by
calculating information from 3 other columns using the following
formula (the date information is buried in a field with lots of other
stuff so this is my attempt to isolate it):
=DATE(D2,B2,C2)

Not sure if this date approach causes a problem with calculations or if
my formulas are just completely off base.

Help greatly appreciated! Trish

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
William Horton
 
Posts: n/a
Default Count items when specific text and date criteria are met

The below formula works for me. Typed exactly how shown.

=SUMPRODUCT(--(TdateDATEVALUE("01/25/2005")),--(TQ7<""))

"javamom" wrote:

Trying to summarize survey data and need to report the number of
specific text responses given before a date and report those given
on/after a date. The date and response information is contained in one
worksheet while the summary is displayed in another worksheet within
the same workbook (Excel 2000, Win XP). I've named the data ranges in
an attempt to make this easier. For example:

"TDate" "TQ7"
10/11/2004 q7= very easy
11/12/2005 q7= fairly easy
12/14/2004 q7= difficult

I'm trying this formula to get a count of all the question 7 responses
on/after the date:
=SUMPRODUCT(("Tdate"=DATEVALUE("01/25/2005"))*("TQ7"<""))

I'm trying this formula to count specific responses by date:
=SUMPRODUCT(("Tdate"=DATEVALUE("01/25/2005"))*(COUNTIF(TQ7,"*very
easy"))

To make things even stranger, I've "created" the date for "TDate" by
calculating information from 3 other columns using the following
formula (the date information is buried in a field with lots of other
stuff so this is my attempt to isolate it):
=DATE(D2,B2,C2)

Not sure if this date approach causes a problem with calculations or if
my formulas are just completely off base.

Help greatly appreciated! Trish


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
javamom
 
Posts: n/a
Default Count items when specific text and date criteria are met

Thanks for the response! The above returns a #NUM! error for me.

Do you think that calculating TDate with =DATE(D2,B2,C2) could be
causing a problem?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
William Horton
 
Posts: n/a
Default Count items when specific text and date criteria are met

No. I calculated TDate with the DATE function as well to rule that out. I
took the exact sample that you gave...

"TDate" "TQ7"
10/11/2004 q7= very easy
11/12/2005 q7= fairly easy
12/14/2004 q7= difficult

I then applied the formula
=SUMPRODUCT(--(TdateDATEVALUE("01/25/2005")),--(TQ7<""))

I got the correct answer of 1.

Maybe try it without the names.

"javamom" wrote:

Thanks for the response! The above returns a #NUM! error for me.

Do you think that calculating TDate with =DATE(D2,B2,C2) could be
causing a problem?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Count items when specific text and date criteria are met

The #NUM could be caused by TDate not being the same size as TQ7. Ranges
must be the same size in SP.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"javamom" wrote in message
oups.com...
Thanks for the response! The above returns a #NUM! error for me.

Do you think that calculating TDate with =DATE(D2,B2,C2) could be
causing a problem?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
javamom
 
Posts: n/a
Default Count items when specific text and date criteria are met

This is probably a stupid question, but by "same size" do you mean
defined range or number of filled cells?

TDate range is: 'trainer data'!$E:$E
TQ7 range is: 'trainer data'!$U:$U

There will be some rows with blank cells in TQ7 but data in TDate. Does
that make sense?

Thanks! Trish

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Count items when specific text and date criteria are met

Ah, you cannot use full columns with SP, it must be a specific range. I
don't mean filled cells, I mean defined range. It doesn't have to be the
same rows/columns, but they do have to have the same number of rows/columns.
So you should define TDate as 'trainer data'!$E1:$E1000 as an example, or
maybe dynamic

OFFSET('trainer data'!$E$1,,,COUNTA('trainer data'!$E:$E),1)

danger with the latter is ensuring that TDate and TQ7 are the same size, so
maybe use this for TQ7

OFFSET('trainer data'!$U$1,,,COUNTA('trainer data'!$E:$E),1)

this will force them to keep synchronised in size

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"javamom" wrote in message
oups.com...
This is probably a stupid question, but by "same size" do you mean
defined range or number of filled cells?

TDate range is: 'trainer data'!$E:$E
TQ7 range is: 'trainer data'!$U:$U

There will be some rows with blank cells in TQ7 but data in TDate. Does
that make sense?

Thanks! Trish



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
javamom
 
Posts: n/a
Default Count items when specific text and date criteria are met

Ah ha! Good to know about full columns. Let me play around with your
suggestion for specifying the ranges. These are large (thousands of
lines) and may get somewhat larger.

Will share if I get it working. Thanks! Trish

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
javamom
 
Posts: n/a
Default Count items when specific text and date criteria are met

The formula does work -- turns out there was a problem in one of the
cells with the date data and that was throwing the whole thing off.
Thanks so much for all the help! Trish

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
COUNTIF: 2 criteria: Date Range Column & Text Column MAC Excel Worksheet Functions 14 September 16th 08 04:39 PM
How do I count items within a date range in Excel? tcolbert Excel Worksheet Functions 2 January 9th 06 06:01 PM
Excel enters date as a text format Kane Excel Discussion (Misc queries) 3 March 22nd 05 09:20 PM
How do I convert a number formated as a date to text in Excel? BrotherNov Excel Discussion (Misc queries) 5 March 2nd 05 03:51 PM
EXTRACT TEXT FROM A DATE Ronbo Excel Worksheet Functions 5 February 1st 05 07:39 AM


All times are GMT +1. The time now is 05:41 AM.

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"