Create a weekly list of who is working from your schedule in Excel. Create a list to manage and track employees. Check out my online courses www.easyexcelanswers.com/courses.html
All my courses include online support and a user manual
Let me teach you the VBA that I have learn in my five years of consulting
Let’s take the frustration out of user forms
Become an Affiliate and earn 25% on Course Sales
For more help visit my website www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.
Contact me regarding customizing this template for your needs.
Click for online Excel Consulting
I am able to provide online help on your computer at a reasonable rate.
I use a Blue condenser Microphone to record my videos, here is the link
Check out Crowdcast for creating your webinars
If you need to buy Office 2019 follow
I use Tube Buddy to help promote my videos
Check them out
Follow me on Facebook
TWEET THIS VIDEO
Follow me on twitter
easyexcelanswers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.
code
Sub staffmanage()
Dim week As Date
Dim Tuesday, Wednesday As Long
Dim Thursday, Friday As Long
Dim Saturday, Sunday As Long
Dim c, day As Long
Dim r, lastrow As Long
Dim erow As Long
‘clear the information from the sheet
Call clearsheet
erow = Sheet2.Cells(Rows.Count, 2).End(xlUp).Row + 1
lastrow = Sheet1.Cells(Rows.Count, 2).End(xlUp).Row
week = Sheet2.Range(“A3”)
For c = 3 To 32
If Sheet1.Cells(3, c).Value = week Then
day = c
‘enter the shifts for that day
Call shifts(day, lastrow)
GoTo Tuesday
End If
Next c
Tuesday:
erow = Sheet2.Cells(Rows.Count, 2).End(xlUp).Row + 1
With Sheet2.Range(Cells(erow, 2), Cells(erow, 3))
.Merge
.HorizontalAlignment = xlCenter
.Value = “Tuesday”
.Font.Bold = True
End With
‘format the cells below the day name
Call formatday(erow)
Tuesday = week + 1
For c = 3 To 32
If Sheet1.Cells(3, c).Value = Tuesday Then
day = c
Call shifts(day, lastrow)
GoTo Wednesday
End If
Next c
(repeat for each day)
End Sub
————————————————————————————————
Sub shifts(day, lastrow)
Dim erow, r As Long
Dim status As String
erow = Sheet2.Cells(Rows.Count, 2).End(xlUp).Row + 1
r = 4
For r = 4 To lastrow
‘everytime if finds a M it put in Morning
If Sheet1.Cells(r, day).Value = “M” Then
Sheet2.Cells(erow, 1).Value = Sheet1.Cells(r, 1).Value
Sheet2.Cells(erow, 2).Value = Sheet1.Cells(r, 2).Value
Sheet2.Cells(erow, 3).Value = “Morning”
erow = erow + 1
End If
(repeat for each shift)
Next r
End Sub
————————————————————————————-
Sub formatday(erow)
‘setting up the day headers so they are the same
Sheet2.Cells(erow, 3).Offset(1, -2).Value = “Phone #’s”
Sheet2.Cells(erow, 3).Offset(1, -2).Font.Bold = True
Sheet2.Cells(erow, 3).Offset(1, -1).Value = “Employee”
Sheet2.Cells(erow, 3).Offset(1, -1).Font.Bold = True
Sheet2.Cells(erow, 3).Offset(1, 0).Value = “Shift”
Sheet2.Cells(erow, 3).Offset(1, 0).Font.Bold = True
Sheet2.Cells(erow, 3).Offset(1, 1).Value = “Notes”
Sheet2.Cells(erow, 3).Offset(1, 1).Font.Bold = True
Sheet2.Range(Cells(erow, 1), Cells(erow, 4).Offset(1, 0)).Interior.ColorIndex = 43
End Sub
————————————————————-
Sub clearsheet()
Dim erow As Long
‘clears the contents and removes the colour
erow = Sheet2.Cells(Rows.Count, 2).End(xlUp).Row + 1
Sheet2.Activate
With Sheet2.Range(Cells(7, 1), Cells(erow, 4))
.ClearContents
.Cells.Interior.Pattern = xlNone
.MergeCells = False
End With
End Sub
Watch more new videos about Excel Office | Synthesized by Mindovermetal English
Beautiful video
Would u mind send the schedule via email?