Attached is an example of what I would like to do.
I have added an "Insert Row" and "Delete Row" button with code for both of them.
The spreadsheet as it is now would be the template for a user to start adding data. Rows 5 & 6 (2 rows) are to always be present in the table.
I would like to add the following functionality to the code for the two buttons:
Insert Row:
1. When a user activates this button, the code checks to see where the active row is currently. If it is at row (value of A1) through row (value of B1), the program will copy the hidden row (row 4) and insert it directly above the active row. The program will index the integer in cell B1 by 1. If active row is not within values above button does nothing.
Delete Row:
1. When a user activates this button, the code checks to see where the active row is currently. It does the following checks:
a. If value of B1 is equal to A1, it does nothing.
b. If B2 is greater than A1, and the active row (value) is between A1+1 and B1 it deletes the active row. The program then decreases the value in cell B1 by 1.
I'm all ears for a better method to my approach if there is one.
Bookmarks