Alright I have a doozy for everybody. I have a master sheet that I copy information in from rep's tracking sheets for the work they do. I created a sheet that auto copies all of their sheets based on the file paths which I use another button to populate in row J. Everything is working swimmingly and the formatting is great but I need something done first. At the next available cell in the C column of their tracking sheets I need to input HOURS for how many hours they work based on their input of how many hours they worked on say D5. So I'm thinking a code similar to the one below that I use to open and copy their sheets except what it does is it checks D5 for the value say they work 8 hours and then it writes 8 "HOURS" texts into 8 cells in the next available cell in column C. I then want it to save their sheet with the changes and close. Please let me know if this is not making sense and i'll clarify lol. I look forward to your answers, excel gods!
Code:
Sub RunAllMacros()
Dim wbSource As Workbook
Dim wsDest As Worksheet
Dim row As Integer, os As Integer
Set wsDest = ThisWorkbook.Worksheets("File Copier")
row = 2
os = 0
With wsDest
Do While .Range("J" & row).Value <> ""
Set wbSource = Workbooks.Open(wsDest.Range("J" & row).Value)
wbSource.Worksheets(1).Range("A5:D500").Copy
Application.DisplayAlerts = False
wbSource.Close
Application.DisplayAlerts = True
If .Range("A1").Value <> "" Then os = 1
.Range("A" & .Rows.Count).End(xlUp).Offset(os).PasteSpecial
row = row + 1
Loop
End With
Set wbSource = Nothing
End Sub