for adding this feature to your excel sheet follow the steps Given below.
Step 1: Press ALT + F11 you will get the following screen
Step 2:Now Double Click on this Workbook and add following Module :
' Author Naushad QamarStep3:Now open your worksheet you will find active cell highlighted..
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
On Error Resume Next
Static OldRange As Range
Static OldIndex As Integer
Const movingColor = 6
If OldRange.Interior.ColorIndex = movingColor Then
OldRange.Interior.ColorIndex = OldIndex
End If
OldIndex = Target.Interior.ColorIndex
Set OldRange = Target
Target.Interior.ColorIndex = movingColor
End Sub
Step4: Now save File as Macro enabled as shown in figure :
Working sample Download
Please Do Comment and give suggestions, moreover if you have any query, feel free to ask.