- Jan 16, 2014
Hey guys, I was wondering if anyone knows how to increment by quarters within vba. The code I have currently should work with years, where dateV represents say 2016, originally entered into a inputbox and converted into a value. It should go across the rows 2016 2017 2018 2019 2020 2021 2022. I need to do this for quarters. If I had dateV equal to 2016Q2, excel isn't going to recognize this and pop out 2016Q2, 2016Q3, 2016Q4... etc. like I would want it to. Any clever ideas? Thanks as always!
base.Range("B3").Select For d = 1 To 7 ActiveCell.FormulaR1C1 = dateV ActiveCell.Offset(0, 1).Select dateV = dateV + 1 Next