Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I set up automatic color change on negativ numbers in Excel


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default How do I set up automatic color change on negativ numbers inExcel

Format, Cells, Number, pick the red format.

Salle wrote:

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default How do I set up automatic color change on negativ numbers in Excel

Precede the second portion of the number format with any of these
colors:
[BLACK], [BLUE], [CYAN], [GREEN], [MAGENTA], [RED], [WHITE], [YELLOW]

If you don't see one you need there, you can use any of the
InteriorColor numbers by using [COLOR n].

Use this VBA routine to figure out which color number corresponds to
which color. It will correspond to the row number.

Sub generateInteriorColors()
Dim i As Long
Dim wsh As Excel.Worksheet

Set wsh = Application.ActiveWorkbook.Worksheets.Add
On Error Resume Next
wsh.Name = "Interior Colors"
If Err.Number < 0 Then
Application.DisplayAlerts = False
wsh.Delete
Application.DisplayAlerts = True
Application.ActiveWorkbook.Worksheets("Interior
Colors").Activate
Exit Sub
End If

For i = 1 To 56
wsh.Cells(i, 1).Interior.ColorIndex = i
wsh.Cells(i, 2).NumberFormat = "$#,##0.00_);[Color " & i & "]
($#,##0.00)"
wsh.Cells(i, 2).Value = -i
Next i
End Sub


On Oct 17, 4:48 pm, Salle wrote:



  #4   Report Post  
Posted to microsoft.public.excel.misc
anu anu is offline
external usenet poster
 
Posts: 18
Default How do I set up automatic color change on negativ numbers in E

HAve you tried conditional formatting fro the same..
Anu

"iliace" wrote:

Precede the second portion of the number format with any of these
colors:
[BLACK], [BLUE], [CYAN], [GREEN], [MAGENTA], [RED], [WHITE], [YELLOW]

If you don't see one you need there, you can use any of the
InteriorColor numbers by using [COLOR n].

Use this VBA routine to figure out which color number corresponds to
which color. It will correspond to the row number.

Sub generateInteriorColors()
Dim i As Long
Dim wsh As Excel.Worksheet

Set wsh = Application.ActiveWorkbook.Worksheets.Add
On Error Resume Next
wsh.Name = "Interior Colors"
If Err.Number < 0 Then
Application.DisplayAlerts = False
wsh.Delete
Application.DisplayAlerts = True
Application.ActiveWorkbook.Worksheets("Interior
Colors").Activate
Exit Sub
End If

For i = 1 To 56
wsh.Cells(i, 1).Interior.ColorIndex = i
wsh.Cells(i, 2).NumberFormat = "$#,##0.00_);[Color " & i & "]
($#,##0.00)"
wsh.Cells(i, 2).Value = -i
Next i
End Sub


On Oct 17, 4:48 pm, Salle wrote:




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change the AUTOMATIC color in Excel for the font? Valerie Excel Discussion (Misc queries) 1 September 19th 06 07:18 PM
Automatic Color Change Chris Excel Discussion (Misc queries) 4 March 30th 06 09:21 AM
Automatic Color Change Gary''s Student Excel Discussion (Misc queries) 0 February 4th 06 07:00 PM
how do i count time numbers whit a negativ sign ( ex -19 hours, 25 rabbeer Excel Discussion (Misc queries) 1 June 29th 05 06:14 PM
HOW DO I CHANGE THE AUTOMATIC BORDER COLOR IN EXCEL? mhbento Excel Worksheet Functions 1 March 16th 05 04:55 PM


All times are GMT +1. The time now is 01:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"