Thomas Scott
New Member
- Joined
- Nov 7, 2021
- Messages
- 15
- Office Version
- 2021
- Platform
- Windows
I have variables (Var) that operate each year and want to convert only those that are take place in 5-year spans into simple yes/no. There would be only six resulting worksheets with each showing results for only that 5-year span. Partially missing data for start, stop,. or both may be present. I have tried If Then concepts but cannot see how to jump (increment) in 2 and 5 year increments without looping that will require a macro. I can do formulas well but writing macros is a much farther stretch. The following is as far as I can figure out. Thanks for any assistance.
Create Timeslices Model.xlsx | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
1 | Name | Var1Start | Var1Stop | Var2Start | Var2Stop | <==Collected data (> 100 Vars) | Reduced to 6 worksheets, each 5 year period | |||||||
2 | Alpha | 2010 | 2012 | 2010 | 2014 | |||||||||
3 | Beta | 2011 | 2013 | 2010 | 2012 | |||||||||
4 | Gamma | 2010 | 2015 | 2014 | 2019 | Problem: Test for operation during 5 year interval and record yes/no | ||||||||
5 | Delta | 2015 | 2019 | 2016 | 2021 | Partially missing data can be present, i.e., missing a start, stop, or both | ||||||||
6 | Epsilon | 2016 | 2020 | 2014 | 2016 | |||||||||
7 | Zeta | 2007 | 2008 | 2012 | 2014 | |||||||||
8 | ||||||||||||||
9 | Name | Var1 | Var2 | <==Worksheet A(2010-2014) | ||||||||||
10 | Alpha | 1 | 1 | |||||||||||
11 | Beta | 1 | 1 | |||||||||||
12 | Gamma | 1 | 1 | |||||||||||
13 | Delta | 1 | 0 | |||||||||||
14 | Epsilon | 0 | 1 | |||||||||||
15 | Zeta | 0 | 0 | |||||||||||
16 | ||||||||||||||
17 | Name | Var1 | Var2 | <==Worksheet B(2015-2019) | ||||||||||
18 | Alpha | 0 | 0 | |||||||||||
19 | Beta | 0 | 0 | |||||||||||
20 | Gamma | 1 | 1 | |||||||||||
21 | Delta | 1 | 1 | |||||||||||
22 | Epsilon | 1 | 1 | |||||||||||
23 | Zeta | 0 | 0 | |||||||||||
Example |