How do I write a comlicated conditional statement?

O

OlYellerSnow

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.
 
R

Ron Coderre

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=G1))

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

XL2002, WinXP
 
O

OlYeller21

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top