I urgently need for today (Sunday) the following three macros for the attached Excel file:
1) a macro assigned to the button “INSERT NEW LINE” of both the sheets, that adds the values manually wrote by the user in line 3 into the rows under the black line, keeping/updating the sorting by column B and the subtotals and preserving the cell background colors...
2) a macro assigned to the button “DELETE (SELECTED) LINE” of both the sheets, that deletes the row where the selected cell(s) currently is/are. Note 1: the user before pressing the button must select one cell, multiple cells of a row or an entire row, that will be deleted. Note 2: it must return/show an error if the user selected multiple rows or a row outside the useful limits, i.e. rows 1-4 or an empty row after the end of all the data
3) a macro assigned to the button “ARCHIVE MATCHED CHARGES&DISCHARGES”, that moves all the rows of the two sheets “BBB charges” and “BBB discharges” that match, i.e. that have a date value in the column “P” of the sheet “BBB charges”, into the third sheet “BBB archived”, one single row for each couple of matched rows this way: [row of the first sheet (without the “P” col.) | empty cell | matching row of the second sheet | date of today].
This third sheet “BBB archived” must be shown like the first two sheets with the sorting by column B + subtotals view (subtotal rule here: for each change in B show the “sum” of *both*the “Quote”) + same cell background colors of the original cells…
Note: this button will be used multiple times so it must *add* the rows to the third sheet after the last row of pre-existent data (if any).
Note 1: the macros must be speed optimized (must do the calculations only on the populated rows, not wasting time on empty rows, etc…)
Note 2: all the cells under the black line in the first two sheets, and ALL the cells of the third sheet, must be and remain protected from manual user modification before and after the execution of the macros
Note 3: all the movements of rows must include the hidden data (the data in the hidden columns)
Note 4: after any macro execution, both the viewing areas of the splitted screen must remain correctly adjusted (i.e. the upper part must show the rows 1-4 and the lower part must show all the other rows starting from the 5th
Note 5: the source of all the macros must be unprotected