Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Trailing price

0

How to do this calculation: we have a Price1 which is a permanently changing price, a Price2 and a percentage PER. If Price1 goes down, Price2 also goes down in the proportion of the percentage PER, but if Price1 goes up, Price2 doesn't change.

Answer
Discuss

Discussion

My case is different. I already have the price in cell F18 and that price constantly changing in the cell. I just need to calculate: If Price goes down, Price2 also goes down in the proportion of a percentage, but if Price goes up, Price2 doesn't change.
emvodream (rep: 2) May 26, '21 at 8:25 pm
Add to Discussion

Answers

0
Selected Answer

There are two methods for doing this at a recent thread. Please take a look. The difference is that in those examples any changed price is recorded whereas you want to record it only if it's higher than the previous. That's a minor change in the code.

Please select the method best suitable to your needs and install it in your workbook. Then, if you need help with the customisation, post a copy of the code you will then have and ask for it to be modified.

Discuss

Discussion

You may be confident to be lieve me that either of the solutions offered will work for you, depending upon how the original price is updated. Follow the process I have outlined for you above and you will have your idea working by tomorrow - today, if you are quick about it.
You may be equally confident in believing me that there is no solution to your problem using worksheet functions. That is because no Excel function can write to a cell other than the one it is in. There are only two ways to write to an Excel cell. Either do it manually or let code do it for you.
Variatus (rep: 4889) May 27, '21 at 7:10 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login