Predmet:Croshair
Ukoliko koristite ovu proceduru ona ce vam pomoci da vidite red i kolonu u odnosu na poziciju na aktivnu celiju.
PreuzmiIzvorni kôd (Visual Basic):Const HLColor As Long = 13434879
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Range, rcol As Range, rrow As Range
Set r = Me.Range("A1:Z500")
If Intersect(Target, r) Is Nothing Then Exit Sub
Set rcol = Intersect(r, Target.EntireColumn)
Set rrow = Intersect(r, Target.EntireRow)
With Target
If .Count > 1 Then Exit Sub
r.FormatConditions.Delete
With rrow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.Color = HLColor
End With
With rcol
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.Color = HLColor
End With
.FormatConditions.Delete
End With
End Sub
Podrska samo putem foruma, jer samo tako i ostali imaju koristi od toga.