Alrighty,
I've attached your original workbook. It now includes two macros that are dependent upon eachother.
The first is the FormatReport macro which runs the ResetReport macro and then populates the Materials Report. The other is the Reset Report macro which clears the existing report on the first worksheet in the workbook.
To run the code, make sure to enable macros when opening the workbook. Then select the Populate Report button at the top left of the Diamond Data worksheet.
To view the code Press Alt+F8 and then select the FormatReport macro, select the Step Into option.
Visual Basic will open and show you the coding for both macros. Anything that appears in green is a comment meant to help you understand the code so that you may alter it to fit your workbook.
Let me know if you have any questions!
Thanks!
Bookmarks