I am creating a new invoicing system for my small business.
I need a button that copies the current invoice total from a Master Invoice workbook to the Account Balances workbook under the corresponding Customer Name and Term Name.
In the Master Invoice workbook I have the Customer Name (Cell G10), what School Term it relates to (Cell H2) and the Total Invoice Amount.
In the Enrolment Database workbook I have a sheet called Account Balances. Column A contains each Customer Name and row 1 contains the School Term Names (Term 1 Invoice, Term 2 Invoice, etc.).
When the "Add to Account Balance" button is pressed I want Excel to find the current Customer Name and Term (x) Invoice in the Master Invoice and copy the Invoice Total to corresponding Cell in the Enrolment Database workbook.
Example: TEST TESTINGTON's Term 1 Invoice comes to $90. When I press my button it copies that $90 and pastes it in Cell B3 because that is the intersection of TEST TESTINGTON (Customer Name) and Term 1 Invoice (Term Name)
Master Invoice notes
Enrollment Database notes
Here is the latest code but I've never got it remotely working
Private Sub AddToAccounts_Click()
Workbooks("Master Invoice.xlsm").Worksheets("Master Invoice").Range("j40").Copy
Workbooks("Enrolment Database.xlsm").Worksheets("Account Balances").Range(Cells("A2:A150", "B1:E1").Address).PasteSpecial Paste:=xlPasteValues
End Sub