Replace VBA with Excel Formulas for an NFL Schedule Workbook
Question details
The user needs to replace VBA code in an NFL schedule workbook with worksheet formulas that return the schedule for a selected week from weekly data stored in worksheets 1 through 18.

- Product
- WPS Office Spreadsheets / Microsoft Excel
- Device & OS
- not provided
- Scenario
- The workbook contains 18 weekly worksheets with an NFL schedule, and the user wants a formula-driven summary that changes based on a week-number input cell.
- Observed behavior
- The goal is to return the selected week’s schedule without using VBA or unreliable dynamic worksheet-name retrieval.
Open the NFL Schedule workbook in WPS Office Spreadsheets and confirm that all 18 weekly worksheets use the same layout. Add a week-number input cell, such as J1, on the summary sheet where the formula result will appear.
Use a Week-Number Input Cell with Explicit Sheet References
Best when you want a stable, formula-only lookup without relying on dynamic worksheet names.
Excel formulas cannot reliably retrieve worksheet names dynamically in every situation. The safest approach is to explicitly reference the weekly sheets or use a controlled lookup structure.
Select cell J1 on the summary sheet, type a week number from 1 to 18, and label the cell as Week Number.
In the first schedule cell, enter a formula such as =IF($J$1=1,'Week 1'!A1,IF($J$1=2,'Week 2'!A1,...)) or =CHOOSE($J$1,'Week 1'!A1,'Week 2'!A1,...), adjusting the sheet names to match the workbook.
Drag the fill handle across the schedule area and keep the week input reference absolute with $J$1 so every cell follows the selected week.
Create a Controlled Lookup Table for Sheet Names
Use this method when sheet names follow a consistent pattern and you are comfortable using INDIRECT with a validated list.
Create a Formula-Based NFL Schedule Lookup in WPS Spreadsheets
You can replace VBA by using WPS Spreadsheets formula functions such as IF, CHOOSE, INDEX, and controlled INDIRECT references to return the selected week's schedule. The same formula approach works in Microsoft Excel workbooks, including .xlsx files with 18 worksheets.
- 1. Open the workbook: Launch WPS Office Spreadsheets and open the NFL Schedule workbook that contains the 18 weekly worksheets.
- 2. Add the week input: Click the summary sheet, select cell J1, and enter a week number from 1 to 18 to drive the lookup.
- 3. Enter the formula: In the first schedule cell, enter an explicit formula such as =IF($J$1=1,'Week 1'!A1,IF($J$1=2,'Week 2'!A1,...)) or =CHOOSE($J$1,'Week 1'!A1,'Week 2'!A1,...), adjusting sheet names to match the workbook.
- 4. Extend the formula: Use the fill handle to copy the formula across the schedule grid, keeping the week input reference absolute with $J$1.
- 5. Test the selection: Change cell J1 to different week numbers and confirm that the schedule displays the corresponding worksheet data.

Frequently Asked Questions
Can Excel formulas read worksheet names dynamically?
Not reliably in every situation. Excel and WPS formulas do not have a native worksheet-name list function, so the safest approach is to explicitly reference the weekly sheets or use a controlled helper list with INDIRECT.
How do I change the selected week in the formula?
Type a different week number in the input cell, such as J1. If the formula uses $J$1, all schedule cells update to that week immediately.
Which formula should I use if my sheets are named Week 1 through Week 18?
You can use a CHOOSE or nested IF formula that explicitly references each sheet, or an INDIRECT formula that builds the sheet name from a controlled helper list.
Will this replace VBA completely in WPS Office?
Yes. WPS Spreadsheets supports Excel-compatible formulas, so you can remove the VBA code and use worksheet formulas to return the selected week's NFL schedule.
What should I do if the schedule layout differs between weekly sheets?
Standardize the layout first, or add helper cells on each sheet that map the needed data to the same cell addresses before using one lookup formula.




