# Positive or negative figure depending on whats in cells.

#### ghrek

##### Active Member
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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

#### Fluff

##### MrExcel MVP, Moderator
What happens if C8=D8?

#### Marc L

##### Well-known Member
Hi,​
what is the cell H8 actual formula ?!​

#### ghrek

##### Active Member
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

(removed)

Last edited:

#### Marc L

##### Well-known Member
So the H8 formula is obviously
Excel Formula:
``=D8-C8``

#### Fluff

##### MrExcel MVP, Moderator

Excel Formula:
``=H8*SIGN(D8-C8)``

#### ghrek

##### Active Member
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.

#### Marc L

##### Well-known Member
Just format the cell according to the expected layout like "##.##" or "0.00" …​

#### ghrek

##### Active Member
Sorry Marc found it DOH

Replies
4
Views
62
Replies
8
Views
212
Replies
2
Views
71
Replies
3
Views
137
Replies
1
Views
156

1,141,045
Messages
5,703,922
Members
421,321
Latest member
blusky4

### 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.

### Which adblocker are you using?

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

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