Figuring my rent in excel

M

mePenny

My rent is $815 pr month if its payed by the 4th of the month. if not payed
by the 4th it jumps and extra $50 (865.00 by the 5th). starting on the 6th of
the month its an extra $5 pr day until the 30th.

Can anyone help me with a formula for this?

Any and all help is truly appreciated!

Penny
 
J

Jacek

Sub qq()
'A1 - enter your rent, for ex. 815
'B1 - enter receive date, for ex. 2009-05-09
'In A2 we will calculate of a rent you should get
Dim Rent As Single, Rday As Integer
Rent = Cells(1, 1)
Rday = Day(Cells(1, 2))
If Rday >= 5 Then Rent = Rent + 50
For x = 6 To Rday
If Rday >= x Then Rent = Rent + 5
Next x
Cells(2, 1) = Rent
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top