I am just venturing into VBA, so please forgive me if I'm asking an easy question with a straightforward solution that has already been address on this site. I've searched for a solution, but I haven't found anything that helps.
I am using a staffing spreadsheet that has a tab for each person in our department and each worksheet lists all active projects and hours allocated by month. I shift the prior month column forward to the next year on a monthly basis and I'd like to automate as much of this work as possible.
I wrote a loop in VBA that cuts the prior month and moves it down, but I need help writing code that lets me clear the cells in a specific range in the column I am moving. The problem is each tab has a different number of projects so I can't simply write code that clears cells Q4:Q12 because the ending cell will vary from tab to tab. There is a row that is consistent across all the worksheets, but I am not sure how write in VBA to clear all cells up to that point.
Any help would be greatly appreciated! Thank you!
Edit - Here is the code I am currently working with.
Sub MoveColumn()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Staffing Summary" Then
ws.Columns("F:F").Cut
ws.Columns("R:R").Insert Shift:=xlToRight
End If
Next ws
Application.CutCopyMode = False
End Sub