Custom formatting of a cell with text

roscoe

Well-known Member
Joined
Jun 4, 2002
Messages
1,062
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I thought I was good at this but...
I track my car maintenance on a spreadsheet because, well who doesn't. Anyway, I'm trying to format a cell that says "Miles to next Oil Change: 6579" where the 6579 is the value of the cell from a formula. That was easy enough, but in my test case when the number went negative (drove past the oil change interval), the minus sign on the mileage number is appearing in front of the text instead of in front of the number ("-Miles to next Oil Change: 107 instead of Miles to next Oil Change: -107)

How do I do this? Microsoft help page is useless in this regard.

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Format as :
"Miles to next Oil Change: " 0;"Miles to next Oil Change: " -0
 
Upvote 0
Solution
Format as :
"Miles to next Oil Change: " 0;"Miles to next Oil Change: " -0
And if the OP really wants these negative values to stand out...

"Miles to next Oil Change: " 0;[Red]"Miles to next Oil Change: " -0
 
Upvote 0
You are welcome BUT you should mark footoo's reply as the answer, not mine. All I did was add a small part to his Custom Format, so the recommended Custom Format is, in the main, his, not mine.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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