Percent Error Macro Installation & Usage

This macro autofills percent error values in a Word table, given a measured and accepted columns.

Step 1 Enable Macros in Word

Macros must be enabled for the… macro… to work (duh) (you only need to do this once)

1	Open Word Options Click File in the top-left corner, then click Options at the bottom of the left panel.
2	Open the Trust Center In the Word Options window, click Trust Center in the left list, then click Trust Center Settings…
3	Set macro security Click Macro Settings on the left. Select "Disable all macros with notification". Click OK, then OK again to close both windows. This ensures that you’ll be prompted before running macros!

Step 2 Load the Macro

1	Reload the file Fully close and re-open this document.
2	Enable Content when prompted A yellow bar will appear at the top of the window saying "Macros have been disabled." Click Enable Content. This only appears once per file.

Step 3 Add the Toolbar Button (Only run once!)

This adds a % Error button to your Word toolbar so you can run the tool from any document.

1	Open the Macros list Click the Developer tab at the top of Word. If you don't see it, see the tip below. Click the Macros button on the left side of the ribbon.
2	Copy to Normal Template Click “Organizer…” on the left of the macros window. On the left panel, click Close File, then Open File. Navigate to THIS document (PercentErrorMacro_Guide.dotm), and Open it. Select both items and copy them over to Normal.dotm, as shown below. X out of the organizer window.
3	Close This File You’re now done with this file! Close it and open your lab report document.
4	Run AddQATButton Navigate to the Macros window (See step 1) and look for "AddQATButton" in the list. Select it and click Run. A message will confirm "Toolbar added." Click OK.
5	Confirm the button appeared You should now see a small "% Error" button in the Add-ins tab. This button will be available in every Word document from now on, unless you uninstall.

Don't see the Developer tab? File → Options → Customize Ribbon → check the box next to Developer → OK.
Want to uninstall? In the Macros window, look for "RemoveQATButton" in the list & run it.

Step 4 Using the Tool

Open any Word document that contains a table with your measurements. Click the % Error button under the Add-ins tab. If not present, Re-execute the `AddQATButton` macro.

1	Select your table The Table dropdown at the top of the window lists every table in the document. Each entry shows a preview of the first cell to help you identify the right one.
2	Check your specs The list shows the row and column ranges configured for this document. If this is the first time using the tool on this file, you will need to set up your ranges (see Step 5).
3	Run Click the ▶ Run button. The percent error values will be written into the Result column immediately.

Step 5 Configuring Row & Column Ranges

A spec tells the tool which columns contain your Measured values, Expected values, and where to write the Result for a given range of rows. All rows and columns are 1-based indices.

Col 1	Col 2 (Measured)	Col 3 (Expected)	Col 4 (Result)	Col 5	Col 6

Example: Measured Col = 2, Expected Col = 3, Result Col = 4

To add a new spec

1	Fill in the five fields Start Row / End Row: the first and last row of data (not counting a header row). Measured Col: the column number that holds your measured values. Expected Col: the column number that holds your theoretical/expected values. Result Col: the column where percent error should be written.
2	Click Add The new spec will appear in the list.

To edit an existing spec

Click the spec in the list and the five fields will populate automatically.

Make your changes, then click Update.

To remove a spec

Click the spec in the list, then click Remove.

⚠ Note: Specs are saved inside your document, so you only need to set them up once per file. They will still be there the next time you open it.

Troubleshooting

Problem	Fix
% Error button is missing	Run AddQATButton again via Developer → Macros.
Yellow bar does not appear when opening the file	Macros may already be enabled, or the file was saved in the wrong format. Make sure the file extension is .docm, not .docx.
"No tables found" message	Make sure your document contains at least one Word table (Insert → Table), not just text arranged in columns.
Result column shows wrong values	Double-check that your column numbers are correct. Column 1 is the leftmost column of the table, not of the page.
Spec is skipped with a bounds warning	The row or column numbers you entered exceed the size of the table. Check how many rows/columns the table actually has.
OH NO IT OVERWROTE MY DATA!!!!!	Just spam ctrl+z and you’ll be fine (fix ur bounds!)