Share via

How do I find the number of peole born in the month of April using an excel formula?

Anonymous
2013-06-01T20:32:31+00:00

How do I find the number of peole born in the month of April using an excel formula?

Name DOB
Adella 12/18/1955
Allen 8/26/1963
Anne 10/29/1947
Beverly 1/2/1971
Bonnie 12/28/1961
Brian 10/16/1979
Carol 4/2/1971
Christopher 11/9/1966
Coral 11/11/1961
Daryl 8/28/1937
David 5/18/1962
David 10/28/1956
David 8/2/1962
Deborah 7/2/1956
Dolores 3/6/1970
Donna 2/10/1962
Donna 3/21/1972
Edward 4/9/1963
Eleanor 9/7/1958
Eva 8/23/1972
Frank 5/2/1945
Fred 1/3/1960
George 1/24/1964
Harry 10/28/1931
James 2/7/1944
James 3/24/1939
Jennifer 7/29/1958
Jennifer 6/11/1971
Jill 7/27/1960
Joanne 5/24/1953
Jody 2/2/1954
John 2/22/1933
John 10/7/1965
John 4/25/1972
Judy 6/7/1954
Julia 10/15/1969
Kathleen 7/8/1942
Kathleen 7/7/1970
Kathy 12/31/1935
Kiley 1/29/1969
Larry 5/4/1952
Larry 5/13/1956
Lewis 5/26/1966
Lewis "Jay" 9/15/1964
Linda 10/11/1960
Lisa 6/11/1947
Margaret 8/16/2004
Marilyn 7/30/1954
Mary 12/29/1963
Mary 10/24/1945
Matthew 6/25/1949
Melvin 4/15/1933
Nicole 12/17/1962
Patricia 10/30/1956
Patricia 10/30/1978
Patty 2/18/1958
Paul 9/6/1956
Paul 10/19/1960
Raymond 4/23/1950
Richard 7/9/1955
Richard 3/21/1944
Richard 8/12/1961
Richard 8/23/1965
Robert 10/24/1962
Robert 2/27/1951
Roy "Bud" 12/1/1944
Shawn 3/5/1958
Sonja 10/6/1951
Susan 12/13/1948
Susan 3/28/1954
Theodore 9/16/1974
Theodore 5/16/1953
Thomas 12/15/1959
William 9/12/1960
William 9/16/1960
Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2013-06-01T21:21:06+00:00

Hi,

I may be missing something here but this counts the April dates in Col B

=SUMPRODUCT((MONTH(B2:B1000)=4)*(B2:B1000<>""))

Change the 4 to (say) 12 for December

Was this answer helpful?

8 people found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2013-06-04T19:35:13+00:00

heyy Mike,

Can you please help me understand this:

why  =SUMPRODUCT((MONTH(B1:B100)=4)*1) gives the right answer

whereas =SUMPRODUCT(MONTH(B1:B100)=4) does not?   :/

Because SUMPRDUCT works on a single array to!

Hi,

The reason the first doesn't work is because SUMPRODUCT likes to work with numbers and this formula

=SUMPRODUCT(MONTH(B1:B100)=4)

is returning an ARRAY like this so sumproduct can't add then up

=SUMPRODUCT({TRUE;TRUE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE})

However in your second formula the *1 coerces all the TRUE and FALSE values into 1 and zero like this.

=SUMPRODUCT({1;1;0;0;0;0;0;0;0;0})

Hope that clears it up. However; once again, I wouldn't use either because if you test for January and there are blank cells in the range those blanks will evaluate as January birthdates.

I would use this one which tests for blanks in the range and because we're multiplying 2 TRUE FALSE arrays then that multiplication coerces the TRUE/FALSE into 1 and zero.

=SUMPRODUCT((MONTH(B2:B1000)=4)*(B2:B1000<>""))

Was this answer helpful?

4 people found this answer helpful.
0 comments No comments

13 additional answers

Sort by: Most helpful
  1. Anonymous
    2013-06-04T16:16:24+00:00

    Sorry Rakesh!

    This does not give the right result. Although it should as SUMPRODUCT works on a single array but i don't understand whats wrong here.

    =SUMPRODUCT((MONTH(B1:B100)=4)*1) gives the right answer

    where as =SUMPRODUCT(MONTH(B1:B100)=4) does not! :/

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2013-06-01T21:35:22+00:00

    I may be missing something here but this counts the April dates in Col B

    No, you were not missing anything... I had posted to the wrong thread in the wrong forum. I deleted my message so as for it not to be confusing to anyone reading this thread.

    Was this answer helpful?

    0 comments No comments
  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more