I am a USAF Major improving a self-designed scheduling tool used to track the schedule of 50-60 service members. I would like to develop an easier interface for COUNTIF a name appears within a non-contiguous range, most likely written in VBA.
The current method is done as a series of COUNTIF statements, depicted in the photo below. The user moves around the range boxes, or adds on another COUNTIF statement to expand the range selection, to capture whatever data needs to be counted. These boxes typically need to be moved and added/deleted weekly. The best part of this method is the user is given immediate feedback with the colored boxes so they know what ranges are being counted. The drawback is editing the cell, moving range boxes, and keeping track of everything manually, is cumbersome for an Excel novice or anytime there are lots of changes to keep track of. We sometimes even have to double count a range, and it can be difficult to tell when that double counting is working correctly.
I would like to make this easier for the user. Is there a VBA script I could write to COUNTIF where the range is dynamically selected based on cell background color? As an example, it would could anywhere the cell background was Blue and the name was present?
That would cover about half of the work I'm trying to do. I would still like to find an alternative, more user friendly method, to these COUNTIF statements such as a userform or inputbox. I would welcome any suggestions.
The current method is done as a series of COUNTIF statements, depicted in the photo below. The user moves around the range boxes, or adds on another COUNTIF statement to expand the range selection, to capture whatever data needs to be counted. These boxes typically need to be moved and added/deleted weekly. The best part of this method is the user is given immediate feedback with the colored boxes so they know what ranges are being counted. The drawback is editing the cell, moving range boxes, and keeping track of everything manually, is cumbersome for an Excel novice or anytime there are lots of changes to keep track of. We sometimes even have to double count a range, and it can be difficult to tell when that double counting is working correctly.
I would like to make this easier for the user. Is there a VBA script I could write to COUNTIF where the range is dynamically selected based on cell background color? As an example, it would could anywhere the cell background was Blue and the name was present?
That would cover about half of the work I'm trying to do. I would still like to find an alternative, more user friendly method, to these COUNTIF statements such as a userform or inputbox. I would welcome any suggestions.