Updating the Macro for changes in the Estimate Template
Issue/Symptom/Question
I have an import file that has Macros. How can I update the Macro if I make changes to the file format by changing around columns and rows?
Environment
Estimate Import file
Microsoft Excel
Macros in Microsoft Visual Basic for Applications
Resolution/Fix/Answer
After formatting the spreadsheet, if the first row for the Costcodes is changed, then the Macros will need to be updated/reset
To access the Macro script,
right-click on the Macro button and select Assign Macro...
in the popup, select the Macro to modify and click the Edit... button
The script will open in Microsoft Visual Basic for Applications (VBA)
If changing the start_detail row macro (Macro2 in screenshot above)
The 57 in the highlighted script below is the row #. If the first costcode row becomes 28, change the highlighted 57s to 28s.
If the Calculated column is changed from column G, the column G references in the Macro will need to be updated to the new column for the Calculated Column.
For example, the “G57:G1999” in the red box below would be “H57:H1999” if the calculated column becomes column H.