Returning + or - for a number result?

hoff123

Board Regular
Joined
Jul 14, 2004
Messages
88
Hi All,

I am trying to work out a function to do the following (but not with much luck).

= A1 – B1. If the result is a positive number return +#. If the result is a negative number return -#

Seems simple enough but just got a brain freeze for a Monday morning!

Thanks!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Why not just use a custom format?

+#;-#
 
Upvote 0
Well you would add the zero part to the custom format.

As the OP didn't specify what they would like for that I left it out.:)

+#;-#;"zero"
 
Upvote 0
I was lazy, but now figured it out. Thanks for not giving the solution :unsure: ;), allowing me to think about...
+#;-#;0
best regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,203,189
Messages
6,054,002
Members
444,696
Latest member
VASUCH

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