Hi all, hope someone can help me with next problem ; I have a template sheet that I use to import data. Once the data is processed and cleaned, it is past to a new clean sheet without VBA code (apart from Conditional format). This is where the problem starts. I am copying and pasting complete sheets, with values only, and need as you can see below 5 criteria for conditional formatting.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("C1:C500")) Is Nothing Then
Select Case Target
Case "Degd Sv."
icolor = 6
Case "short Sv dis."
icolor = 12
Case "Sv Dis>5min"
icolor = 7
Case "long Sv dis"
icolor = 53
Case Else
icolor = 0
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
Porblem is that this does not work whith copying data and that I als get a RUNTIME ERROR 13 / Type mismatch.
Who of you guru's out there can help me ?
Thanks
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("C1:C500")) Is Nothing Then
Select Case Target
Case "Degd Sv."
icolor = 6
Case "short Sv dis."
icolor = 12
Case "Sv Dis>5min"
icolor = 7
Case "long Sv dis"
icolor = 53
Case Else
icolor = 0
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
Porblem is that this does not work whith copying data and that I als get a RUNTIME ERROR 13 / Type mismatch.
Who of you guru's out there can help me ?
Thanks