Change off days easily in schedule in Excel



Change off days easily in schedule in Excel. Change the day off for employee without rewriting code. 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 offdays()
Dim c, r As Long
Dim DN As Long

r = 7
c = 2
Do While Sheet1.Cells(r, 2).Value (not equal to) “”
DN = Sheet1.Cells(r, 2).Value
If DN = 1 Then
‘Sunday
Call daynumber(r, c, DN)
End If
If DN = 2 Then
‘monday
DN = 2
Call daynumber(r, c, DN)
End If

If DN = 3 Then
‘Tuesday
DN = 3
Call daynumber(r, c, DN)
End If
If DN = 4 Then
‘Wednesday
DN = 4
End If
Call daynumber(r, c, DN)
If DN = 5 Then
‘Thursday
DN = 5
Call daynumber(r, c, DN)
End If
If DN = 6 Then
‘friday
DN = 6
Call daynumber(r, c, DN)
End If
If DN = 7 Then
‘Saturday
DN = 7
Call daynumber(r, c, DN)
End If

r = r + 1
Loop
End Sub
Sub daynumber(r, c, DN)
For c = 3 To 93
If Sheet1.Cells(3, c).Value = DN Then
Sheet1.Cells(r, c).Value = “O”
End If
Next c
End Sub

Watch more new videos about Excel Office | Synthesized by Mindovermetal English

5/5 - (1 bình chọn)

Bài viết liên quan

Theo dõi
Thông báo của
guest
1 Comment
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất
Phản hồi nội tuyến
Xem tất cả bình luận
arykl Anees

Hi bh, good video (tricks Administrator), & I have a question excel vba time zone is connected computer time zone?