|
현재셀의 값과 위 셀의 값을 비교하여 같을 경우와 다를 경우 셀서식을 다르게
정합니다. 그런데 작동하지 않네요 무엇을 어떻게 해야 하는지 알려주세요
---------------------------------------------------------------------------------
Sub 위셀값과현재셀값비교조건부서식()
'
Dim x, y As Range
Set x = ActiveCell
Set y = ActiveCell.Offset(-1, 0)
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="= x <> y "
Selection.FormatConditions(1).Interior.ColorIndex = 6
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="= x = y "
Selection.FormatConditions(1).Interior.ColorIndex = 38
End Sub
* 답변하시는 분들께 도움이 되도록 자신의 환경을 아래 항목 옆에 기재해 주세요.
1. 엑셀 버전(95,97,2000,2002):
2. 윈도우즈의 버전(win95,win98,winME,winNT,win2000,winXP):
3. CPU (486,PentiumI/II/III/IV...):
4. RAM (32,64,128,256,512MB,1G...):
* 아래줄에 질문을 작성하세요 >> |
|