What expenses to be paid between two salaries in Excel



What expenses to be paid between two salaries in Excel. Determine when bills need to be paid.
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 secondsalary()
Dim payamount2, balance As Double
Dim paydate2, npaydate2 As Date
Dim r, c As Long
Dim erow, lastrow As Long
paydate2 = Sheet1.Cells(13, 6).Value
payamount2 = Sheet1.Cells(12, 6).Value
Pfreq2 = Sheet1.Cells(12, 7).Value
Sheet2.Activate
r = 2
c = 2
balance = Sheet2.Cells(r, 6).Value
For r = 2 To 6
Sheet2.Cells(r, c).Select
If ActiveCell.Value (greater than)paydate2 Then
Sheet2.Cells(r, c).EntireRow.Insert
GoTo continue
End If
If ActiveCell.Value (less than) paydate2 Then
ActiveCell.Offset(1).EntireRow.Insert

GoTo continue
End If
Next r
continue:
ActiveCell.Value = paydate2
Sheet2.Cells(r, 5) = payamount2
Sheet2.Cells(r, 3).Value = “pay”
Sheet2.Cells(r, 6).Value = payamount2
r = 3
c = 2
cnt = 0
Select Case Pfreq2
Case Is = “biweekly”
npaydate2 = paydate2
Do While cnt (less than) 26
npaydate2 = npaydate2 + 14
For r = r To 60
Sheet2.Cells(r, 2).Select
If ActiveCell.Value (greater then)npaydate2 And ActiveCell.Offset(-1) less then npaydate2 Then
Sheet2.Cells(r, c).EntireRow.Insert
ActiveCell.Value = npaydat2
Sheet2.Cells(r, c).Value = npaydate2
GoTo continue3
End If
Next r
continue3:
If ActiveCell.Value = npaydat2 Then
cnt = cnt + 1
Sheet2.Cells(r, 3).Value = “pay”
Sheet2.Cells(r, 5).Value = payamount2
balance = balance + payamount2
GoTo ende
Else
Sheet2.Cells(r, 3).Value = “pay”
Sheet2.Cells(r, 2).Value = npaydate2
Sheet2.Cells(r, 5).Value = payamount2
Sheet2.Cells(r, 1).Value = Month(npaydate2)

cnt = cnt + 1
GoTo ende2
End If
ende2:
r = r + 1
Loop
Case Is = “bimontly”
npaydate2 = paydate2
stpaymon = Month(npaydate2)
Do While cnt less then 22
Sheet2.Cells(r, c).Select
myday2 = Day(npaydate2) ‘what is the day
mymon2 = Month(npaydate2) ‘what is the month
myyr2 = Year(npaydate2)
npaydate2 = DateSerial(myyr2, mymon2, myday2)
If myday2 = 1 Then
npaydate2 = npaydate2 + 14
End If
If myday2 = 15 Then
npaydate2 = DateSerial(myyr2, (mymon2 + 1), 1)
End If
‘check for spot
For r = r To 60
Sheet2.Cells(r, 2).Select
If ActiveCell.Value greater then npaydate2 And ActiveCell.Offset(-1) less then npaydate2 Then
Sheet2.Cells(r, c).EntireRow.Insert
ActiveCell.Value = npaydat2
Sheet2.Cells(r, c).Value = npaydate2
GoTo continue2
End If
Next r
continue2:
If ActiveCell.Value = npaydat2 Then
cnt = cnt + 1
Sheet2.Cells(r, 3).Value = “pay”
Sheet2.Cells(r, 5).Value = payamount2
balance = balance + payamount2
GoTo ende
Else
Sheet2.Cells(r, 3).Value = “pay”
Sheet2.Cells(r, 2).Value = npaydate2
Sheet2.Cells(r, 5).Value = payamount2
Sheet2.Cells(r, 1).Value = Month(npaydate2)
cnt = cnt + 1
GoTo ende
End If
ende:
r = r + 1
Loop
End Select
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