how to insert a dynamic column in vba
Re: VBA code for suming a dynamic column range will this macro help you. VB: Sub test() Dim r As Range, j As Long, k As Long j = Range(A1).End(xlToRight).Column For k = 1 To j Set r = Range(Cells(1, k), Cells(1, k).End(xlDown)) r.End(xlDown).Offset(2, 0) = WorksheetFunction.Sum(r) Next k End Sub.