Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I set up automatic color change on negativ numbers in Excel
|
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I set up automatic color change on negativ numbers inExcel
Format, Cells, Number, pick the red format.
Salle wrote: |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change the AUTOMATIC color in Excel for the font? | Excel Discussion (Misc queries) | |||
Automatic Color Change | Excel Discussion (Misc queries) | |||
Automatic Color Change | Excel Discussion (Misc queries) | |||
how do i count time numbers whit a negativ sign ( ex -19 hours, 25 | Excel Discussion (Misc queries) | |||
HOW DO I CHANGE THE AUTOMATIC BORDER COLOR IN EXCEL? | Excel Worksheet Functions |