Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are different ways to identify weekends on a Google spreadsheet depending on your specific purpose. Here are some possible methods:

  1. Use the WEEKDAY function: The WEEKDAY function returns the day of the week as a number from 1 (Sunday) to 7 (Saturday). You can use it to create a conditional formula that highlights the weekend days with a different color, for example. Here's an example formula to get you started:

=IF(WEEKDAY(A1,2)>5,"Weekend","Weekday")

This formula checks if the date in cell A1 falls on a Saturday or Sunday (represented by the numbers 6 and 7 using the optional argument 2) and returns the text "Weekend" if true, or "Weekday" if false.

  1. Use conditional formatting: You can apply conditional formatting to a range of cells to automatically highlight the weekend days. Here's how:
  • Select the range of cells you want to format.
  • Click on Format > Conditional formatting in the menu.
  • In the "Format cells if" dropdown, choose "Custom formula is."
  • In the "Value or formula" field, enter "=WEEKDAY(A1,2)>5" (assuming your dates are in column A) and choose the formatting style you want.
  • Click on Done.

This will highlight the cells that correspond to Saturday and Sunday.

  1. Use the FILTER function: You can use the FILTER function to extract only the weekend days from a range of dates, for example:

=FILTER(A:A,WEEKDAY(A:A,2)>5)

This formula returns a new column that only includes the weekend dates from column A.

You can combine these methods or adapt them to suit your specific needs.