Determine which bills to be paid between paychecks in Excel



Determine which bills to be paid between paychecks in Excel. Create a list of bills and expenses and slot them between paychecks. 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 Tube Buddy to help promote my videos
Check them out

TWEET THIS VIDEO
Follow me on twitter
easyexcelanswers

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 expense()
Dim paydate, paydate2 As Date
Dim duedate As Date
Dim r, c As Long
Dim mon, erow As Long
Dim myday, nexday As Long
Dim s As Long
r = 2
lastrow = Sheet1.Cells(Rows.Count, 2).End(xlUp).Row
erow = Sheet2.Cells(Rows.Count, 2).End(xlUp).Row
Do While Sheet2.Cells(r, 3).Value (Not equal to) “”
Sheet2.Cells(r, 3).Select
If Sheet2.Cells(r, 3).Value not equal to pay” Then GoTo ende
If Sheet2.Cells(r, 3).Value = “pay” Then
Sheet2.Cells(r, 6).Value = Sheet2.Cells(r, 6).Offset(-1, 0).Value + Sheet2.Cells(r, 5).Value
paydate = Sheet2.Cells(r, 2).Value
Sheet2.Activate
Sheet2.Cells(r, 2).Select
myday = Day(paydate)
mymon = Month(paydate)
myyr = Year(paydate)
paydate = DateSerial(myyr, mymon, myday)
paydate2 = Sheet2.Cells(r, 2).Offset(1, 0).Value
nexday = Day(paydate2)
mymon2 = Month(paydate2)
myyr2 = Year(paydate2)
paydate2 = DateSerial(myyr2, mymon2, nexday)
s = 2
For s = 2 To lastrow
due = Sheet1.Cells(s, 1).Value
‘——define duedate————-
duedate = DateSerial(myyr, mymon, due)
If duedate greater than paydate Then
If duedate greater than paydate 2Then GoTo ende
Sheet2.Cells(r, 2).Select
ActiveCell.Offset(1).EntireRow.Insert Shift:=xlDown
r = r + 1
Sheet2.Cells(r, 2).Select
due = Sheet1.Cells(s, 1).Value
diff = due – myday
Sheet2.Cells(r, 2).Value = duedate
Sheet2.Cells(r, 3).Value = Sheet1.Cells(s, 2).Value
Sheet2.Cells(r, 4).Value = Sheet1.Cells(s, 3).Value
Sheet2.Cells(r, 6).Value = Sheet2.Cells(r, 6).Offset(-1, 0).Value – Sheet2.Cells(r, 4).Value
End If
Next s
End If
ende:
r = r + 1
Loop
End Sub

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

Rate this post

Bài viết liên quan

Theo dõi
Thông báo của
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận