Excel BYROW and XLOOKUP Formulas for Schedule Total and Calendar Checks
Question details
Create Excel formulas that check each schedule row against its expected total and return a calendar variation based on the combination of selected schedule columns.

- Product
- Microsoft Excel for Microsoft 365
- Device & OS
- not provided
- Scenario
- The worksheet contains row totals in column A, schedule values across columns B:H, and a separate schedule pattern table used to return a calendar variation.
- Observed behavior
- The required result is a Pass or Fail result for each total check and a matching calendar variation for each row's pattern of 1 values.
Confirm that you are using Microsoft 365 or another spreadsheet version that supports dynamic-array functions, including BYROW, LAMBDA, FILTER, TAKE, and DROP. Check that the schedule headers and the lookup-table patterns use identical text and appear in the same intended order.
Validate each schedule row total with BYROW and LAMBDA
Use this formula when column A should match the highest schedule value in columns B:H for every row.
The formula processes each row in A2:H13. It removes the first column, finds the maximum value in the remaining schedule cells, and compares that value with the value in column A.
Review rows that contain only zeros before using the result. A zero-only schedule row should not be assigned an expected total of 3 unless that is an intentional business rule.
Click the cell where you want the Pass or Fail results to spill, such as I2.
Type or paste =BYROW(A2:H13,LAMBDA(x,IF(MAX(DROP(x,,1))=TAKE(x,,1),"Pass","Fail"))) and press Enter.
Filter or inspect the rows that return Fail, then compare the value in column A with the maximum value across columns B:H.

Return a calendar variation by matching selected schedule headers
Use this formula when each row in K:R contains 1 values that identify a schedule pattern, and a lookup table maps each pattern to a calendar variation.
Check Schedule Totals and Calendar Patterns in WPS Spreadsheet
WPS Spreadsheet provides a familiar worksheet environment for organizing schedule data, checking row results, and maintaining lookup tables for calendar variations. Import the workbook, place the validation and lookup formulas in output columns, and review spilled results beside the source schedule.
- 1. Open the schedule workbook: In WPS Office, select Spreadsheet and open the Excel .xlsx or .xls file containing the schedule data.
- 2. Create a results column: Click an empty column next to the schedule table and add a header such as Total Check or Calendar Variation.
- 3. Enter the schedule formula: Select the first output cell, enter the appropriate row-check or lookup formula, and press Enter to calculate the result.
- 4. Verify lookup table ranges: Select the lookup table and confirm that its pattern labels and returned variation values align with the schedule headers.

Frequently Asked Questions
Why does the BYROW formula return Fail for a row containing only zeros?
The formula compares the value in column A with MAX of the schedule cells in columns B:H. For a zero-only row, the maximum is 0, so column A must also be 0 to return Pass.
What does DROP(x,,1) do in the schedule validation formula?
Within each BYROW row array, DROP(x,,1) removes the first column. This leaves the schedule values in columns B:H so MAX does not include the expected total in column A.
How does the calendar variation formula determine which headers to look up?
FILTER(K1:R1,z=1) returns only the headers whose corresponding cells in the current row contain 1. TEXTJOIN then combines those headers into one lookup key.
What should I do when XLOOKUP cannot find a schedule pattern?
Add a not-found value as the fourth XLOOKUP argument, such as XLOOKUP(lookup_value,lookup_array,return_array,"No match"). Then add the missing header combination to the pattern table if it should have a calendar variation.
Can I change the separator used by TEXTJOIN in the lookup key?
Yes. You can replace the vertical bar character with another separator, but use exactly the same separator in both TEXTJOIN expressions so the generated keys continue to match.




