ferocious12
Member
Hi All,
I have data for same month in multiple columns in a continuous range.
Each month range is separated by a blank column.
What I want is a macro that find the next blank cell in column starting cell B10 and autosum the columns preceding the blank cell.
I want autosum in highlighted columns in yellow (must be a loop).

I started writing the code but stuck:
Many thanks
Sophia
I have data for same month in multiple columns in a continuous range.
Each month range is separated by a blank column.
What I want is a macro that find the next blank cell in column starting cell B10 and autosum the columns preceding the blank cell.
I want autosum in highlighted columns in yellow (must be a loop).

I started writing the code but stuck:
Code:
Sub sum()
ActiveSheet.Range("b10").Select
Selection.Columns.End(xlToRight).Offset(0, 1).Select
ActiveCell.Value = "=Sum(columns.end (xltoleft)"
End Sub
Many thanks
Sophia
Last edited by a moderator: