Frage

I'd like to perform the following calculation (in Open Office Calc or Excel) and would like to know the formula for doing so:

Take a number (in currency format) in one column, and increase or decrease it by a percentage from a second column (percentage will be a positive or a negative number) and generate the correct result in a third column.

Examples:

1) If $1.00 is increased by 25% the correct result is: $1.25. 2) If $5.00 is decreased by 50% the correct result is: $2.50.

It seems to me I need to use some kind of conditional formula, which says: "If the percentage is less than zero, subtract it from the currency number. If the percentage is greater than zero, add it to the currency number."

Am I correct? If so, what would the correct formula be, for Open Office or Excel? Thanks in advance.

War es hilfreich?

Lösung

Yes, your concept is correct. Here is a formula that works on open office

5   50  7.5     =A2+(B2/100)*A2

10 -50 5 =A3+(B3/100)*A3 15 -33 10.05 =A4+(B4/100)*A4

Column A has value, Column B % , Column C result, Column D shows formula behind column C

Andere Tipps

Well, the basic formula is amt * (1 + percentage/100). For amt=1 and percentage=25, that gives 1.25; for amt=5 and percentage=-50 it gives 2.5. You may need to reformat the formula for your particular program.

Another way to write the formula is amt + amt*(percentage/100). That demonstrates a little more clearly what's happening: for negative percentages, you're adding a negative number to amt, which is to say making amt smaller.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top