I have a worksheet in excel 2010 which has 3 colored columns. Each column cell has a formula in it which checks the date in column H and changes the text to various values based from the formula. (See Example Below)
Example of formula in the 3 columns (Each column has a slightly different version) you can see these in the sub code below.
Each cell in column J has a checkbox in it. For the 1st checkbox I have written the code below which runs on the event CheckBox1 "Click":
My problem is that I have like 70 checkboxes on this sheet and I want them all to do the same thing as this first checkbox does. It makes no sense to paste this same code 70 times and change all of the ranges in it. How can I write the rest of the subs to call this sub but change the ranges based on the ID number of the remaining checkboxes? For example Checkbox2 is on the row below CheckBox1. So being that I know that the row difference will always be consistant mathmatically how can I pass the checkbox ID number from Sub2 to the Sub above and change the ranges?
Its hard to explain what I'm trying to do so please let me know if you need more information or specifics on it. If you have an idea of a better way to do this (for the future in case I add additional rows or columns, etc. please let me know too)
Here is a picture of the spreadsheet. excel_checks.jpg
Bookmarks