Updating Excel Code
Hi Norman this be the code
Private Sub Worksheet_Calculate()
Dim oCell As Range
For Each oCell In Range("V3:GU36")
Select Case oCell.Value
Case Is < 1
oCell.Interior.ColorIndex = xlNone
' This is for Holidays UPPERCASE
' The Colour for this Cell is Green
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "H"
oCell.Interior.ColorIndex = 10
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
' This is for Half Day Holidays UPPERCASE
' The Colour for this Cell is Green
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "H/2"
oCell.Interior.ColorIndex = 10
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
' This is for Holidays lowercase
' The Colour for this Cell is Green
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "h"
oCell.Interior.ColorIndex = 10
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
' This is for Half Day Holidays lowercase
' The Colour for this Cell is Green
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "h/2"
oCell.Interior.ColorIndex = 10
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
' End of the Holiday Section
'Start of Bank Holidays
' This is for Half Days Bank Holiday lowercase
' The Colour for this Cell is Pink
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "bh/2"
oCell.Interior.ColorIndex = 7
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
' This is for Half Days Bank Holiday UPPERCASE
' The Colour for this Cell is Pink
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "BH/2"
oCell.Interior.ColorIndex = 7
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
' This is for Bank Holiday lowercase
' The Colour for this Cell is Pink
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "bh"
oCell.Interior.ColorIndex = 7
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
' This is for Bank Holiday UPPERCASE
' The Colour for this Cell is Pink
' The Color of the Font is White
' The font in the cell is emboldened
Case Is = "BH"
oCell.Interior.ColorIndex = 7
oCell.Font.ColorIndex = 2
oCell.Font.Bold = True
End Select
Next oCell
End Sub
--
N/A
"Norman Jones" wrote:
Hi Joel,
Try posting your code.
---
Regards,
Norman
"Joel" wrote in message
...
HI can some please assist with this issue on updating Excel I have written
some code in Excel thet when you put in a certain letter in a cell it
should
turn the cell a different colour.
Now this does not happen until you go in to view code and click run, WHY?
I have set calculations to automatic in options but I still have to go
into
view code
Any Ideas many thanks
--
N/A
|