Hi experts!
I have an excel doc with a VBA macro to run as a final publish on the worksheet. I have attached the file here.
Aside from knowing it is clunky and inefficient (I'm new to using VBA and I'm self taught), I have a few issues that I need help solving.
I have tried to comment as best I can through the close what each section is doing/meant to do so hopefully that helps.
A breakdown of the macros in the workbook are:
PasteAsValues: Paste the values only
PageBreaksCustomPrompt: Insert page breaks above cells with the entered value
PageBreaksStandard: Insert page breaks above cells containing &&&BREAK&&&
NewMachine: Enter the new worksheet name, copy the Template cover and hazard workbooks with the new name to the end of the workbook before the Lookup and Scoring Sheets
NewHazard: Copy the hazard block to the bottom of the activesheet
DeleteRowsandREmoveGroups: As the title states (effectively reverses the FinaliseHazards macro)
FinaliseHazards/ FinaliseHazardsTEST (one I'm having issues with):
1) Sort the columns of the hazard block tables by the custom sort list
2) Add page breaks before cells with &&&BREAK&&&
3) create the first table (combined controls) - copy all the controls from all tables, remove duplicates in Column C, remove blanks from Column C, sort the table
4) Group the hazard block tables into two group levels (1 = grouping the whole block; 2 = grouping the blank rows in column C (using the errors in column I)
5)Copy the data from Columns L:O into the hazard table below and sort from highest current score to lowest
Issues I'm having when I run the FinaliseHazards macro on the TEMPLATE-Hazards worksheet
1) Level 2 grouping isn't including the last blank row
2) The combined Controls Table is including a blank row after removing duplicates and blanks
3) the hazard table headers arent changing font or background and font colour.
I know this is a lot and you all help out so much in this community. I have been racking my brain and searching online to fix this for the last week with no luck.
Any help is much appreciated, help with making it less clunky and inefficient would be a nice to have but at this stage i just want it to work.
Bookmarks