Limit Formula to 2 decimal places

erock24

Well-known Member
Joined
Oct 26, 2006
Messages
1,163
Hi I am using this formula to return a value and a label

=IF(NewGP-OldGP=0,"No Change",IF(NewGP-OldGP>0,NewGP-OldGP&" Increase",IF(NewGP-OldGP<0,NewGP-OldGP&" Decrease")))

value = NewGP-OldGP and where the formula is bolded I only need the standard 2 decimal format. I've tried, but failed.

thank you for your time and help.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi
Try this
=IF(NewGP-OldGP=0,"No Change",IF(NewGP-OldGP>0,Text(NewGP-OldGP,"#.00")&" Increase",IF(NewGP-OldGP<0,TEXT(NewGP-OldGP,"0.00")&" Decrease")))
 
Upvote 0
Or you could format the cell to be:
#,##0.00 Increase;-#,##0.00 Decrease
Which has the advantage that it is still numeric and you can do further calculations from the result.
 
Upvote 0
Formula
=NewGP-OldGP

and format as
#,##0.00 "Increase";-#,##0.00 "Decrease";"No Change"
 
Upvote 0
thank you all for the help.

I adjusted the formula with this concept because for my application it was the best fit.

Text(NewGP-OldGP,"0.00")

works great
 
Upvote 0

Forum statistics

Threads
1,214,394
Messages
6,119,263
Members
448,881
Latest member
Faxgirl

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