Making my budget sheet easier to use?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,

I'm trying to create a Macro that can help me with my monthly and yearly budgets buy adding in the figures for me,

Heres what I'm trying to do.

I have lots of small loans from friends and family that now business is going well I want to start paying back
I also have my monthly yearly out goings that I would like to include so I get a total outgoings each month for the next 5 years.
What I'm hoping is excel can do the hard work for me and let me just add the figures once into the sheet rather then having to each one up to 60 times!

So heres what I want?

In columns A I have the Name of the Expence.
In column B The month it starts (this is very important as some bills don't kick in for 6 months like rent etc.)

Oh and although I might say the month it starts all dates are input as the first of the month so if it start in june the date will say 01/06/2016 (dd/mm/yyyy)

D is how often, this will only say one of two words "Monthly" "Yearly"
Durration so if it says monthly it might say 60, 36 etc, yearly, 2,4,5 etc.
E Amount,
F Full amount or payment, (This is important as most bill are a regular amount each month, say £20 so this would be maked as "Monthly" however others are the full amount I owe, for example Mums Loan £500, so if I've said its monthly over 36 mounths I need 500 divided into 36, if it yearly £500 divided into 3 ,

(you can see why I need help with this!!!)

Next

From column H I have a monthly calender again the date showing as 01/06/2016, etc.
for the next 5 years,

what I want is a macro that can look at each row,
look at the start date, if it says due monthly, workout the monthly amount and insert that amount into each month for the duration of the term, if its yearly once a year,

can anyone help me with this please?

If its easier I could split the data into,
Monthly with monthly amounts

Yearly with yearly amounts,

Monthly with full amount

Yearly with full amount?

thanks

Tony
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi Tony,

It shouldn't be too difficult but I think I'd really need to see some sample data. From your description I imagine something like this:


Book1
ABCDEF
1NameStartFrequencyDurationAmountType
2Mum's loanOct 16112£500F
3RentSep 16160£20P
4Bank LoanAug 16123£1,000F
5OverheadAug 16160£50P
Sheet1


Note that I changed the Frequency to be a number of months (1 or 12) as it would make the VBA a little easier and also allow new values of 3, 6 etc. if necessary. For the last column I was using F for full amount and P for payments. Does this look reasonable?

WBD
 
Upvote 0
Hi WBD,
that's that's fine, happy to change it slightly if it makes it easier, your example is spoy on how it will look.

Thanks

Tony
 
Upvote 0
Using this format:


Book1
ABCDEFGHIJKLMNOPQRST
1NameStartFrequencyDurationAmountTypeAug-16Sep-16Oct-16Nov-16Dec-16Jan-17Feb-17Mar-17Apr-17May-17Jun-17Jul-17Aug-17
2Mum's loanOct-16112£500F£41.67£41.67£41.67£41.67£41.67£41.67£41.67£41.67£41.67£41.67£41.67
3RentSep-16160£20P£20.00£20.00£20.00£20.00£20.00£20.00£20.00£20.00£20.00£20.00£20.00£20.00
4Bank LoanAug-16123£1,000F£333.33£333.33
5OverheadAug-16160£50P£50.00£50.00£50.00£50.00£50.00£50.00£50.00£50.00£50.00£50.00£50.00£50.00£50.00
Sheet1


I used the following code:

Code:
Public Sub CreatePaymentSchedule()

Dim lastRow As Long
Dim thisRow As Long
Dim thisCol As Long
Dim startDate As Date
Dim frequency As Long
Dim duration As Long
Dim amount As Currency
Dim paymentType As String
Dim firstMonth As Range
Dim paymentCount As Long

Set firstMonth = Range("H1")

lastRow = Cells(Rows.Count, 1).End(xlUp).Row
For thisRow = 2 To lastRow
    startDate = Cells(thisRow, 2).Value
    frequency = Cells(thisRow, 3).Value
    duration = Cells(thisRow, 4).Value
    amount = Cells(thisRow, 5).Value
    paymentType = Cells(thisRow, 6).Value
    thisCol = DateDiff("m", firstMonth.Value, startDate) + firstMonth.Column
    For paymentCount = 1 To duration
        Select Case paymentType
            Case "F"
                Cells(thisRow, thisCol).Value = amount / duration
            Case "P"
                Cells(thisRow, thisCol).Value = amount
        End Select
        Cells(thisRow, thisCol).NumberFormat = "£#,##0.00"
        thisCol = thisCol + frequency
    Next paymentCount
Next thisRow

End Sub

WBD
 
Upvote 0
Thank you WBD,
this is exactly what I needed :)

Thank you very much

Tony
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top