What exactly should the macro do?

Ask the employees involved to describe the workflow: which file is read, which fields matter, and what is calculated? Which file or report should exist at the end? Steps outside Excel, such as storing a file or sending an email, also belong in the description.

An AI response is an initial draft. OpenAI notes that ChatGPT can produce convincing but incorrect output. The source is linked below. The rules and results for your application still require independent business review.

Clarify possible effects before testing

Use suitable copies and designated test files. Before running the macro, establish whether it overwrites data, deletes or moves files, sends emails, or calls other programs and services. Unclear access needs to be understood first.

Record the initial state and check how it can be restored. Keep the test environment limited so unintended changes do not affect production workflows. A run without an error message does not establish that the results are correct.

Use reference cases employees can understand

The following methodological example is fictional and not a client reference. Assume a required workflow reads quantities and unit prices and calculates line totals. In this example, prices are required and duplicate document numbers must be clarified before import.

Example reference cases for an import and calculation macro
Test caseExpected behaviour in this exampleWhat to record
10 units at €12.50Line total €125.00.Input file, mapped fields and result.
A required price is missingThe line is reported as incomplete rather than silently calculated with zero.Message and state of the output data.
A document number is duplicatedThe duplicate is identified before import.Location and agreed handling.
Columns appear in a different orderAgreed mapping works or a clear error is reported.Recognised file structure and mapping.
A source file is unavailableA traceable message is shown and an incomplete import remains recognisable.Error, steps already performed and restart procedure.

Expectations for your actual file are agreed with the people responsible. They can include rounding rules, date boundaries, negative values and very large or small inputs. Results should be confirmed using understandable examples or a second independent calculation.

A test record makes differences visible

For each test, record the file version, inputs, expected result and actual observed result. Include changed files, messages and open questions. This makes a difference easier to reproduce later.

Download the Excel macro test record template. The CSV file includes prompts and space for your results. It is not an automated test and does not approve any particular workbook.

After a code correction, rerun the same cases. Which additional cases are required depends on the business rules and the possible effects of an error.

Running the workflow in a browser is a separate implementation question

Excel for the web cannot run, create or edit VBA macros. Microsoft documents this limitation in the support page linked below. Opening an XLSM file in a browser therefore does not provide its macro workflows as an independent web application.

If several employees need to work together through defined roles or connected systems, we assess the need for a new application. Only the workflows agreed as required are then implemented anew.

When a structured assessment helps

If nobody fully understands the code, we start with employee workflows and the available files. I investigate the formulas, macros and dependencies relevant to the required tasks. Reference cases provide a basis for business review of the new implementation.

When is replacing Excel worthwhile? explains the decision to rebuild. The guide to cost and effort describes what needs clarification before a proposal. The relevant service is Excel tools as web applications.

Sources and fact checking

Checked on 4 December 2026.