23.08.2023 Views

CFI-Excel-eBook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Corporate Finance Institute Excel

We get the results below:

This formula uses the WEEKDAY function to test dates for either a Saturday or

Sunday. When given a date, WEEKDAY returns a number 1-7, for each day of

the week. In their standard configuration, Saturday = 7 and Sunday = 1. By

using the OR function, we used WEEKDAY to test for either 1 or 7. If either is

true, the formula will return TRUE and trigger the conditional formatting.

If we wish to highlight entire row, we need to apply the conditional formatting

rule to all columns in the table and lock the date column. The formula to use

will be =OR(WEEKDAY($B2)=7,WEEKDAY($B2)=1).

corporatefinanceinstitute.com

122

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!