If a cell contains any text then add a value (with dates)

Solved/Closed
ryannordgren Posts 6 Registration date Saturday 4 March 2017 Status Member Last seen 7 March 2017 - 4 Mar 2017 à 19:22
ryannordgren Posts 6 Registration date Saturday 4 March 2017 Status Member Last seen 7 March 2017 - 7 Mar 2017 à 19:01
I am looking for help with a formula that will allow me to add up the number of times a certain date is a Monday. I am using =COUNTIF(A1:A30,"*Monday*"). The issue that I have is I am entering dates like 3/6/17 and have the formatting set to show it as "Monday, March 7, 2017." Because Monday was not typed into the cell, it doesn't count it. Is there a way to get the number of Mondays counted?? Please help.
Related:

2 responses

Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
4 Mar 2017 à 20:27
ryannordgren, Good evening.

Try to use:

=SUMPRODUCT(--(WEEKDAY(A1:A30, 2)=1))

Is that what you want?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
ryannordgren Posts 6 Registration date Saturday 4 March 2017 Status Member Last seen 7 March 2017
4 Mar 2017 à 23:32
Yes, Thank you! This works.
ryannordgren Posts 6 Registration date Saturday 4 March 2017 Status Member Last seen 7 March 2017
5 Mar 2017 à 00:04
One more question, if you have the time. I can get this to work now for each day of the week except for Saturday. Any idea how to get it to count Saturdays using this same formula?