I am trying to create a macro that will move up to the line above that has text, then shoot to the end of the row where the text ends. I used the control + arrow key while recording the macro, but it was one cell short of where I wanted it to be when I tried it. I am using dates, where my macro goes to the last day of the prior month and adds 1. When I did this for August, it went to July 30, instead of to the end of the line.
here is the macro code:
ActiveCell.FormulaR1C1 = "=R[-4]C[29]+1"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=RC[-1]+1"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveWindow.SmallScroll Down:=-3
ActiveCell.Offset(-1, 1).Range("A1").Select
here is the macro code:
ActiveCell.FormulaR1C1 = "=R[-4]C[29]+1"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=RC[-1]+1"
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveWindow.SmallScroll Down:=-3
ActiveCell.Offset(-1, 1).Range("A1").Select