To generate a dynamic series of dates that are weekends only (Saturday and Sunday), you can use the WORKDAY.INTL function. In the example shown, the date in B5 is a hardcoded start date. The formula in B6 is:
This returns only Saturdays or Sundays as the formula is copied down. The list is dynamic – when start date is changed, the new dates are generated.
The WORKDAY.INTL function is normally used to generate dates that are workdays. For example, you can use WORKDAY.INTL to find the next workday that is not a weekend or holiday, or the first workday 10 days from now.
One of the the arguments provided to WORKDAY.INTL is called "weekend", and indicates which days are considered non-working days. The weekend argument can be provided as a number linked to a preconfigured list, or as a 7-character code that covers all seven days of the week, Monday through Saturday. This example uses the code option.
In the code, 1's represent weekend days (non-working days) and zeros represent work days, as illustrated with the table in D4:K5. We only want to to see Saturdays and Sundays in the output, so use 1 for all days Monday-Friday, and zero for Saturday and Sunday:
With a given start date, the WORKDAY function will return a date that is not a weekend or holiday, n days in the future or past. The holidays argument is optional and can be omitted. In the example, B5 a the hard-coded start date. The formula below...
The WORKDAY.INTL function is normally used to find dates that are workdays. For example, you can use WORKDAY.INTL to find the next workday that is not a weekend or holiday, or the first workday 5 days from now. One of the the arguments provided to...
The Excel WEEKDAY function takes a date and returns a number between 1-7 representing the day of week. By default, WEEKDAY returns 1 for Sunday and 7 for Saturday. You can use the WEEKDAY function inside other formulas to check the day of week...
Excel Formula Training
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.