Hallo,
Even een vraagje over onderstaand stukje macro.
Alles gaat behalve :="=""Cells(30, i)"""
Als ik kijk via Opmaak en dan Voorwaardelijke opmaak dan zie ik bij voorwaarde 1
celwaarde is gelijk aan ="Cells(30, i)"
in plaats van ="Cells(30, i)" daar zou ik =$D$30 willen zien
Sub KleurMinMaxOVOrg()
'
Dim Aantal
Sheets("Blad1").Select
Range("I9").Select
Aantal = ActiveCell.Cells
Sheets("O-V Org").Select
i = 3
k = Aantal + 4
For teller = 1 tot 32
i = i + 1
k = k + 1
Range(Cells(6, i), Cells(k, i)).Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Cells(30, i)"""
Selection.FormatConditions(1).Font.ColorIndex = xlAutomatic
Selection.FormatConditions(1).Interior.ColorIndex = 6
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""cells(31, i)"""
Selection.FormatConditions(2).Font.ColorIndex = xlAutomatic
Selection.FormatConditions(2).Interior.ColorIndex = 6
Next teller
Even een vraagje over onderstaand stukje macro.
Alles gaat behalve :="=""Cells(30, i)"""
Als ik kijk via Opmaak en dan Voorwaardelijke opmaak dan zie ik bij voorwaarde 1
celwaarde is gelijk aan ="Cells(30, i)"
in plaats van ="Cells(30, i)" daar zou ik =$D$30 willen zien
Sub KleurMinMaxOVOrg()
'
Dim Aantal
Sheets("Blad1").Select
Range("I9").Select
Aantal = ActiveCell.Cells
Sheets("O-V Org").Select
i = 3
k = Aantal + 4
For teller = 1 tot 32
i = i + 1
k = k + 1
Range(Cells(6, i), Cells(k, i)).Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Cells(30, i)"""
Selection.FormatConditions(1).Font.ColorIndex = xlAutomatic
Selection.FormatConditions(1).Interior.ColorIndex = 6
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""cells(31, i)"""
Selection.FormatConditions(2).Font.ColorIndex = xlAutomatic
Selection.FormatConditions(2).Interior.ColorIndex = 6
Next teller