Hello All,
I'm working on creating a sheet that can start at the top of a column of data, Cell E19, and Place a SUM of the costs in Column E at the bottom, one cell down from the last piece of data. The number of rows can change, but the header will always start in E19. So far I have written the code to start at cell E19, go to the last cell, and place "Total" and "Expected WD Credit" under the dataset.
I want the SUM to go to the right of "Total"
Sub Sum_Stocklift_Column()
Range("E19").Select
Selection.End(xlDown).Select
ActiveCell.Offset(2).Select
ActiveCell.FormulaR1C1 = "Total:"
ActiveCell.Offset(2).Select
ActiveCell.FormulaR1C1 = "Expected WD Credit:" 'code down to this line goes to bottom of cost column and types totals'
ActiveCell.Offset(-2, 1).Select 'move from active cell ("Expected WD Credit"), up 2 cells and right 1 cell'
ActiveCell.Offset(-1, 0).Select 'move up from cell to the right of "Total"'
End Sub
I'm working on creating a sheet that can start at the top of a column of data, Cell E19, and Place a SUM of the costs in Column E at the bottom, one cell down from the last piece of data. The number of rows can change, but the header will always start in E19. So far I have written the code to start at cell E19, go to the last cell, and place "Total" and "Expected WD Credit" under the dataset.
I want the SUM to go to the right of "Total"
Sub Sum_Stocklift_Column()
Range("E19").Select
Selection.End(xlDown).Select
ActiveCell.Offset(2).Select
ActiveCell.FormulaR1C1 = "Total:"
ActiveCell.Offset(2).Select
ActiveCell.FormulaR1C1 = "Expected WD Credit:" 'code down to this line goes to bottom of cost column and types totals'
ActiveCell.Offset(-2, 1).Select 'move from active cell ("Expected WD Credit"), up 2 cells and right 1 cell'
ActiveCell.Offset(-1, 0).Select 'move up from cell to the right of "Total"'
End Sub