mykulpasskwa
Board Regular
- Joined
- Mar 20, 2018
- Messages
- 66
Hi, I need some help getting started on a code. I have a range ("B4:B") of variables that are related by the first four characters (the year). Currently an input box will appear asking which year to run the code in, and the default value is based on the left four characters of the active cell. The years are usually grouped together so I currently have it going to the next cell and checking if the new active cell matches the previous cell. I would like to eliminate the input box completely and:
- have Excel start at "B4" which contains the first term of that year
- find all occurrences of that year,
- run the sub I have already which sums values in an adjacent cell and highlights the term they went over an annual cap
- then moves on to the next cell
- if it is the same year it adds that value to the counter
- if it is a new year it resets the counter and runs the third procedure above