Auto invoicing with expired dates

philfloyduk

Board Regular
Joined
Jan 6, 2011
Messages
82
Hi.

I have set up a spreadsheet and user form to manage our domestic appliance rentals. The rental is managed with a rental ID number which populates all the information on a user form (thanks to the help of one of the members here).

I would like to set it up to automatically print an invoice when each rental expires. All I need to know is how to code the sheet to recognise it's expired and how to then get the sheet to run code in to the form and generate the invoice. I don't need the code to populate the form or to create an invoice, I already have that, I just need to know how to activate some form of range("a5")_change code to run when the cell is flagged as expired.

Thanks in advance for any help offered.

Phil
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
How are the dates in A5 populated?
Are they formulas or keyed dates?
How soon after the expired date do you want to print the invoice?
 
Upvote 0
Hi Richard.

The layout is as follows.

A2 = Rental ID
B2 = Address
C2 = Expiry date
D2 = Payment status
E2 = Hirer name

Obviously there are multiple entries so the cell number will vary.

When the rental ID is marked as delivered/ 'Active' the userform feeds these five cells with the information, so the date is put in to the cell using

sheets("annual rentals").range("c2").value = format, (expiryTextBox.value, "dd/mm/yyyy").

I'd like an invoice to be printed 14days prior to expiration, and then re-print if it's not been marked as paid within 28 days from the original invoice with a "reminder" label on.

Thank you for your response

Phil
 
Upvote 0
You can use a formula to check what needs to be printed when by comparing the expiry date with todays date.
Assuming the spreadsheet will be used 7 days a week, in cell F2 enter
=if(c2=today()-14,"Print Today","")

in cell G2 you'll need to enter a marker to say if the invoice has been printed/paid

in cell H2 enter
=if(and"c2=today()-28,g2=""),"Reminder","")

You can then use the contents of cells F2 and G2 to customise the printing of the invoices.
 
Upvote 0

Forum statistics

Threads
1,224,519
Messages
6,179,263
Members
452,902
Latest member
Knuddeluff

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