Positive or negative figure depending on whats in cells.

ghrek

Active Member
Joined
Jul 29, 2005
Messages
426
Hi

I have a workbook that I need a formula for if poss.

What it is if C8 value is GREATER than D8 then I need H8 shown as a negative figure
and
If C8 is LESS that D8 then I need H8 shown as a positive figure.

Any Ideas?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi,​
what is the cell H8 actual formula ?!​
 
Upvote 0
Fluff
If C8=D8 then I need the value shown as 0.00

Marc
Cell H8 is not a formula but a value.

What im trying to do is there are 2 values 1 in C8 and 1 in D8. Sometimes one is greater or less than the other and I need the difference showing in H8
 
Upvote 0
So the H8 formula is obviously
Excel Formula:
=D8-C8
 
Upvote 0
Solution
In that case how about
Excel Formula:
=H8*SIGN(D8-C8)
 
Upvote 0
Marc

That works what you said is there anyway I can get it to show as a -xx.xx rather than just a negative figure in red.
 
Upvote 0
Just format the cell according to the expected layout like "##.##" or "0.00" …​
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,239
Members
448,555
Latest member
RobertJones1986

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