Function Problems

Replace VBA with Excel Formulas for an NFL Schedule Workbook

Elise WilliamsElise Williams Nov 13, 2026 870 views

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.

Replace VBA with Excel Formulas for an NFL Schedule Workbook
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.
Before you start

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.

Solution 1Recommended

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.

1
Add a week-number input cell

Select cell J1 on the summary sheet, type a week number from 1 to 18, and label the cell as Week Number.

2
Build an explicit lookup formula

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.

3
Copy the formula across the schedule range

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.

Stable formula-based schedule lookup: The formula updates immediately when the week number changes and does not depend on VBA or macro-enabled content.
WPS Spreadsheets solution

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. 1. Open the workbook: Launch WPS Office Spreadsheets and open the NFL Schedule workbook that contains the 18 weekly worksheets.
  2. 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. 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. 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. 5. Test the selection: Change cell J1 to different week numbers and confirm that the schedule displays the corresponding worksheet data.
Replace VBA macros with easy-to-maintain worksheet formulasFull compatibility with Microsoft Excel .xlsx workbooks and formulasFree, lightweight WPS Office spreadsheet toolsFamiliar Excel-style functions and user interfaceNo macro security prompts or VBA debugging
microsoft office alternative - wps office

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.