Formula between two numbers show as percentage up and down

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,280
Office Version
  1. 2013
Platform
  1. Windows
Good Day,
Can you please help me on that given formula below?
I couldn't find out to make the formula result if the percentage needed to show as negative.
If column D has a negative numbers it doesn't give correct result.
Thanks


Excel Formula:
IFERROR(IF(D2="","",((D2-C2)/C2)*IF(OR(AND(D2<0,C2),AND(D2<0,C2>0)),-1,1)),"")
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi,

Can you explain in words what your requirements are when C2 and/or D2 are positive and/or negative, and how that affects the result?
 
Upvote 0
Hello,
Is there any way to show on second row negative value on column C ?

15,0007,500-50.0%
15,000(7,500)150.0%
 
Upvote 0
Hello,
Is there any way to show on second row negative value on column C ?

15,0007,500-50.0%
15,000(7,500)150.0%

If that's all you want, I don't see the need to Test D cell for negative, unless I'm not understanding fully.

Book3.xlsx
CDE
115,0007,500-50.00%
215,000-7,500-150.00%
315000 
4150002500066.67%
Sheet942
Cell Formulas
RangeFormula
E1:E4E1=IF(OR(C1="",D1=""),"",(D1-C1)/C1)


EDIT: added to formula to Test C cell for blank.
 
Last edited:
Upvote 0
What if they're Both negative, ie (C2=-50, D2=-100), should the result be positive or negative?
 
Upvote 0
(50)(100)(50)
(100)(20)80
(300)(500)(200)
(700)(200)500

Not sure if I follow, how did you come up with the E column results, it doesn't look like there's a Percentage relation between C & D, it looks more like, if Both C & D are negative, you just want the difference between the two?
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

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