Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I write a comlicated conditional statement?

I have a survery with 10 answers. How can I write a conditional statement
that will display the number of times a certain answer comes up within a week
that I designate. Entries are added all the time do I don't want it to be
dependent on row position. I've used a COUNTIF statement to count how many
times an answer is given in a certain column but I don't want to have to
designate what that column is every time since I will be adding more rows on
a regular basis.

In regular ol' english, I need it to:
Search a column of dates (sorted in ascending order) and find the rows (each
survey) that fall between 2 dates that I specify in 2 certain cells. Once it
finds the rows between those dates, count the number of times a certain
answer was given in another column.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default How do I write a comlicated conditional statement?

Try something like this:

With
Dates in A1:A100
Survey answers in B1:B100

F1: (StartDate)
F2: (EndDate)

G1: (survey value to count)
H1: =SUMPRODUCT((A1:A100=F1)*(A1:A100<=F2)*(B1:B100=G 1))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"OlYellerSnow" wrote:

I have a survery with 10 answers. How can I write a conditional statement
that will display the number of times a certain answer comes up within a week
that I designate. Entries are added all the time do I don't want it to be
dependent on row position. I've used a COUNTIF statement to count how many
times an answer is given in a certain column but I don't want to have to
designate what that column is every time since I will be adding more rows on
a regular basis.

In regular ol' english, I need it to:
Search a column of dates (sorted in ascending order) and find the rows (each
survey) that fall between 2 dates that I specify in 2 certain cells. Once it
finds the rows between those dates, count the number of times a certain
answer was given in another column.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 268
Default How do I write a comlicated conditional statement?

Have you tried DCOUNT(database,Field,Criteria)

"OlYellerSnow" wrote:

I have a survery with 10 answers. How can I write a conditional statement
that will display the number of times a certain answer comes up within a week
that I designate. Entries are added all the time do I don't want it to be
dependent on row position. I've used a COUNTIF statement to count how many
times an answer is given in a certain column but I don't want to have to
designate what that column is every time since I will be adding more rows on
a regular basis.

In regular ol' english, I need it to:
Search a column of dates (sorted in ascending order) and find the rows (each
survey) that fall between 2 dates that I specify in 2 certain cells. Once it
finds the rows between those dates, count the number of times a certain
answer was given in another column.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I write a comlicated conditional statement?


Hey! The SUMPRODUCT method worked perfectly. I was pulling my hair out
over that one. I didn't think it would be so easy. Thanks for the
help.
Zach


--
OlYeller21
------------------------------------------------------------------------
OlYeller21's Profile: http://www.excelforum.com/member.php...o&userid=36309
View this thread: http://www.excelforum.com/showthread...hreadid=560823

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
Share write protection fails Mikael Schvili Excel Discussion (Misc queries) 0 March 22nd 06 11:12 AM
Conditional formula - language needed gamebird Excel Worksheet Functions 7 October 10th 05 11:48 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
How can I use HYPERLINK in a conditional statement between sheets Mikey Excel Worksheet Functions 1 May 3rd 05 08:07 PM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


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