Yearly Discount By 20%

vdanelia

Registered User.
Local time
Today, 12:13
Joined
Jan 29, 2011
Messages
215
Hello Friends
I need to do:
I have A text box -Date /Time [Dateofpurchase]
another text box [Price]
after one year the product price must discounted by 20% in my third text box [Discount]
I need in VBA
Thank you very much
 
Where are you stuck? You can use an If/Then block to test the date field with the DateDiff() and Date() functions.
 
Hello Friends.
At first look i thought that it was very easy to implement, but when i realize everything that i want.. It's so hard to implement.

I'll Try To explain step by step what must be done...

I have 3 Text boxes:
1. DateofPurchase -Date/Time (I will enter the product date of purchase), let's say it is 2/4/2011

2. Price (I will enter the product price) Let's say it is 1000$
3. Discount (Here is the problem) this field must display (Calculate) 20% of discount of 1000% at 2/4/2012, the calculated price will be 800$ ("1000$ - 20% = 800$), after one year in 2/4/2013 the discount must be ("800$ - 20%), and this must go while the price will become "0"

How to fulfill this ?
 
How about

OriginalPrice * (1-(Int(DateDiff("d",DateOfPurchase,Date())/365)*.2))
 
At an oriinal price of 10000$ it would take 45years to reach 0$
 

Users who are viewing this thread

Back
Top Bottom