Highlight Excel cells while entering Data

Home More Videos

When you enter large amount of data into MS Excel worksheet cells or have difficulty navigating the Excel cells, you can have the cell highlighted before you start entering data. This helps to reduce errors during data entry. This can be specially useful for senior citizens or visually handicapped persons.
One of our website visitors had this exact query. The solution to highlighting Excel cells while entering data can be easily found using Excel VBA. The macro code is simple as shown below:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Cells.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 43
End Sub

What does the vba code accomplish:
It colors the excel cell in which you want to enter the data. Once you leave the cell the original cell color (white) is restored and the next selected cell gets highlighted.

If you not sure which color will appear when you use a colorindex number, you can visit this excellent website for colorindex numbers and the relevant color.

Now watch the MS Excel training video below to see how the code is written and implementd:

Watch the video on youtube