JayCheezey
New Member
- Joined
- Jul 25, 2014
- Messages
- 17
Hi all,
I have a quick question...
This is just a simplified small data piece of a larger file. I just want to know if this is possible before I implement it throughout the entire file.
My goal is to create a macro that allows me to input what week is desired, then it spits out the number count of Week 1 up until the particular week inputted. For example, if I input Week 3, the macro would spit out 5 because up until week 3, there are 5 cells that have values in them. See example bellow
<COLGROUP><COL style="WIDTH: 30pt; mso-width-source: userset; mso-width-alt: 1462" width=40><COL style="WIDTH: 48pt" span=9 width=64><TBODY>
</TBODY>
Ideally, what I would like to accomplish is adding the week number to the count formula. Like if I input 3, the count function would extend the count region to B4:D7 or (B4:B7)+2 columns. I know that this is possible if I do if statements from week 1-52. But this would be inefficient if I incorporate this in the entire file I'm working with.
FYI, in the actual code instead of count, I've created a function called CountColor which counts 1 based on cell color and font color. I'm just wondering if what I'm asking is possible before I continue...
Thanks in advance!
I have a quick question...
This is just a simplified small data piece of a larger file. I just want to know if this is possible before I implement it throughout the entire file.
My goal is to create a macro that allows me to input what week is desired, then it spits out the number count of Week 1 up until the particular week inputted. For example, if I input Week 3, the macro would spit out 5 because up until week 3, there are 5 cells that have values in them. See example bellow
A | B | C | D | E | F | G | H | I | |
1 | JAN | FEB | |||||||
2 | Week | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
3 | |||||||||
4 | x | 1 | 1 | 1 | 1 | ||||
5 | y | 1 | |||||||
6 | z | 1 | |||||||
7 | a | 1 | 1 | 1 | 1 | 1 | |||
WEEK | 3 | COUNT | 5 |
<COLGROUP><COL style="WIDTH: 30pt; mso-width-source: userset; mso-width-alt: 1462" width=40><COL style="WIDTH: 48pt" span=9 width=64><TBODY>
</TBODY>
Ideally, what I would like to accomplish is adding the week number to the count formula. Like if I input 3, the count function would extend the count region to B4:D7 or (B4:B7)+2 columns. I know that this is possible if I do if statements from week 1-52. But this would be inefficient if I incorporate this in the entire file I'm working with.
FYI, in the actual code instead of count, I've created a function called CountColor which counts 1 based on cell color and font color. I'm just wondering if what I'm asking is possible before I continue...
Thanks in advance!