Negative Numbers

sburkhar

Active Member
Joined
Oct 4, 2006
Messages
363
Can a column be formatted so that all numbers appear as negative numbers on a template? So any number I enter will be negative even if I forget to enter the minus sign?

Thank you
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

You could set up DATA --> VALIDATION, CUSTOM

FORMULA = A1<0

or for a VB version, if you put this code into the relevant sheet code window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then
    If Target.Value > 0 Then Target.Value = Target.Value * -1
End If
End Sub

Change refs as required.
 

sburkhar

Active Member
Joined
Oct 4, 2006
Messages
363
Simply format them as -0.00

From where do I do this formatting? I don't want to have to remember to add the minus sign every time.

Thank you for responding
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows

ADVERTISEMENT

Hello,

Select the whole column, then select FORMAT --> CELLS, choose CUSTOM and enter -0.00.

This will format numbers entered as negative with two - symbols though.
 

sburkhar

Active Member
Joined
Oct 4, 2006
Messages
363
Hello,

Select the whole column, then select FORMAT --> CELLS, choose CUSTOM and enter -0.00.

This will format numbers entered as negative with two - symbols though.

So far so good. Let me work with this for a while and see if it will work with the spreadsheet.

thank you so much!
 

sburkhar

Active Member
Joined
Oct 4, 2006
Messages
363

ADVERTISEMENT

Hello,

Select the whole column, then select FORMAT --> CELLS, choose CUSTOM and enter -0.00.

This will format numbers entered as negative with two - symbols though.

Darn! This is making them "appear" as negative numbers, but they don't function as negatives. In your defense, I did ask how to make them appear as negatives.
I need them to appear and function as negatives. It would be even better if they appeared like this (0.0000).
Can you help?
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

I would suggest using the DATA VALIDATION I described earlier.
 

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
If you actually want them converted into negatives, I'd suggest onlyadrafter's vba solution.
 

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
If you actually want them converted into negatives, I'd suggest onlyadrafter's vba solution.
 

Forum statistics

Threads
1,141,757
Messages
5,708,349
Members
421,566
Latest member
7Nabisco

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
Top