# combined Countif and weekday function

✭✭

I have a sheet which has a date field. This field is filled in with a date based on the date to which something occurred.

I have helping columns in that same sheet that extracts only the Month, Date, and weekday based on date field. With the "helping columns" on a different sheet which i'm calling "stat sheet" i'm counting how many "Sundays" represented by the number "1" there are in totality so i can graph the weekdays and month of the year.

My question is this.

On my stat sheet, is it possible to do a countif and weekday function in order to get rid of the need of using the "helping columns"

I'm using the following text, can someone please tell me what i'm doing wrong.

=COUNTIF(WEEKDAY({BPD DTU Responses Range 6}), "1")

• ✭✭✭✭✭✭

I was trying it with this formula, but I can only get it to return "1" for a value. I know there are bunch of matching dates in the column. Try it and see if it does the same for you.

=COUNT(COLLECT({BPD DTU Responses Range 6}, WEEKDAY(@cell), 1))

• ✭✭

I'm also getting the result of 1.

Just to clarify my intent though, i'm not really tring to collect anyhing, in all reality there is only 1 criteria i am trying to search against.

Using the "weeday" function from the date: =weekday(date) illustrated below I get the appropriate number using a helper field. I'm just trying to accomplish the same thing without the helping field.

Count the number of records in the "date" column where the weekday = "1" where 1=Sunday.

Date day of week field

10/10/21 1

10/10/21 1

10/10/21 1

10/13/21 4

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!