Counting rows in databse according to two columns of data
Counting rows in databse according to two columns of data
(OP)
We use excel spreadsheets as login databases for samples in the lab. Each row is a new sample with 10 or 12 columns of information. What I would like excel to do is to count the number of rows that were entered each month as well as if another column has an X or not. I am using two ifcounts, subtracted from each other to get the number of samples per month already. But everything I try to get excel to see if there is an X in another column backfires. Any help would be greatly appreciated.
dewdog
dewdog





RE: Counting rows in databse according to two columns of data
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Counting rows in databse according to two columns of data
SUMPRODUCT maybe the way to go, not knowing the layout of the data, have come up with the following example.
Col A has dates
Col B has x's.
In E1 enter an number for the month e.g. 2
In F1 enter x
Then in G1 enter the following formula
=SUMPRODUCT(--(MONTH($A$1:$A$6)=E1),--($B$1:$B$6=F1))
amend ranges as required.
----------------------------------
Hope this helps.
----------------------------------
maybe only a drafter
but the best user at this company!