Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails
Sub DoTasks() Dim cell As Range Dim total As Integer Dim rows_in_col As Integer Dim header As Range 'Find cells in header If Range("F5") = "" Then 'May only be one cell in header Set header = Range("E5") Else Set header = Range(Range("F5"), Range("F5").End(xlToRight)) End If 'Find the max row For Each cell In header rows_in_col = Range(cell, cell.End(xlDown)).Count If rows_in_col > total Then total = rows_in_col End If Next cell 'Add the sum column two rows below max For Each cell In header Cells(cell.Row + total + 1, cell.Column).Formula = "=@subtotal(9," & _ Range(cell, cell.End(xlDown)).Address & ")" Next cell 'Same command as double clicking the border. Range("A:S").EntireColumn.AutoFit Cells(header.Row + total + 1, 1).Activate End Sub
|How can I modify this Excel worksheet with a script?||15||46|
|How do I paste a macro from one spreadsheet to another.||2||13|
|Excel file merge 2 cells with line break||2||23|
|Add macros on Open||9||32|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
11 Experts available now in Live!