How to Highlight Weekdays and Calculate Travel Percentages in Excel
Question details
The user needs to highlight workdays or weekends in a calendar, track travel days marked with an 'X', and calculate accurate monthly and annual travel percentages specifically against the total number of weekdays.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating an Excel calendar to track travel days and calculate accurate travel percentages based on the available workdays in each month.
- Observed behavior
- Incorrect denominator logic or conditional formatting results in inaccurate travel percentages, such as calculating 27% instead of the correct 32% for 7 travel days out of 22 workdays.
Ensure your calendar is structured with clearly defined date headers, row layouts for months, and distinct columns for days before applying complex date formulas.
Use Conditional Formatting and SUMPRODUCT to Calculate Percentages
Apply WEEKDAY formulas in conditional formatting to distinguish weekends, then combine COUNTIF and SUMPRODUCT to isolate weekday data for accurate percentage calculations.
To get an accurate travel percentage, you must divide your travel days by the number of workdays, not the total days in the month. Conditional formatting visually separates workdays from weekends, while formula logic ensures accurate mathematical denominators.
Select your calendar range (for example, B2:AF13). Go to the 'Home' tab, click 'Conditional Formatting', and select 'New Rule'.
Choose 'Use a formula to determine which cells to format'. Enter =WEEKDAY(DATEVALUE(B$1&"-"&$A2&"-"&$A$1),2)>5 to highlight weekends (days 6 and 7). Apply a background fill color and click 'OK'.
In your percentage column (e.g., AH2), construct a SUMPRODUCT and COUNTIF formula to divide the number of 'X' markers by the exact number of weekdays in that month. This ensures your denominator accurately reflects the 22 possible workdays instead of the 31 calendar days.
Drag the formula down the column to calculate all monthly percentages. Select the column, right-click, choose 'Format Cells', navigate to the 'Number' tab, and select 'Percentage'.

Track Travel Days and Calculate Percentages Effortlessly in WPS Spreadsheet
WPS Spreadsheet provides robust date functions like WEEKDAY, SUMPRODUCT, and intuitive Conditional Formatting to help you track workdays and calculate accurate travel percentages seamlessly.
- 1. Open your calendar: Launch WPS Spreadsheet and open your travel tracking calendar document.
- 2. Apply Conditional Formatting: Navigate to the Home tab, click 'Conditional Formatting', select 'New Rule', and enter your WEEKDAY formula to highlight workdays or weekends.
- 3. Input advanced formulas: Use COUNTIF and SUMPRODUCT in your totals column to accurately divide your travel days by the total workdays.
- 4. Format as Percentage: Select the calculated cells and click the '%' icon on the Home ribbon to instantly display your accurate monthly percentages.

Frequently Asked Questions
Why is my travel percentage calculation showing the wrong number?
This usually happens when the formula's denominator includes weekends instead of just workdays. Ensure your formula divides the travel days specifically by the number of workdays (e.g., using a formula that excludes weekends) rather than the total calendar days in the month.
What does the '2' mean in the WEEKDAY formula?
The '2' in the WEEKDAY function specifies the return type. It tells the spreadsheet to treat Monday as 1 and Sunday as 7. This is the standard method for identifying weekends, as any returned value greater than 5 corresponds to Saturday or Sunday.
Can I automatically calculate the number of workdays between two dates?
Yes, you can use the NETWORKDAYS or NETWORKDAYS.INTL functions. These functions automatically calculate the exact number of working days between a designated start and end date, automatically bypassing weekends and any specified holidays.




