Related:
- Macro sum
- Spell number in excel without macro - Guide
- Macro excel download - Download - Spreadsheets
- Excel macro to create new sheet based on value in cells - Guide
- Sum sum disney - Download - Puzzle
- Run macro on opening workbook - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jul 12, 2011 at 10:02 PM
Jul 12, 2011 at 10:02 PM
suppose data is there from E3 to E12 you mean to sum E3 to E12 and subtract E12 which means sum E3 to E11.
so the macro will be
so the macro will be
Sub test() Dim r As Range Set r = Range(Range("E3"), Cells(Rows.Count, "E").End(xlUp).Offset(-1, 0)) Cells(Rows.Count, "E").End(xlUp).Offset(1, 0) = WorksheetFunction.Sum(r) End Sub
Jul 15, 2011 at 02:11 AM
appreciate your kind help