How To Change Cell Color When Cell Is Clicked Or Selected In Excel ? | Excel Tips & Tricks |

Published: 14 November 2021
on channel: Dot.Computer
17,313
129

#ExcelTips&Tricks
#ExcelHacks
This video will show you how to change cell color while clicking on a cell, and change the highlighted color while selecting a range of cells in Excel.

In the worksheet you will change the cell color when clicking on it, right click the sheet tab and click View Code from the right-clicking menu.
Just Simply Copy and Paste the Microsoft Visual Basic code.
______________________________________________________________

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
.Worksheet.Cells.FormatConditions.Delete
.FormatConditions.Add xlExpression, , "TRUE"
.FormatConditions(1).Interior.Color = vbYellow
End With
End Sub

_______________________________________________________________________
If any problem with the code then pause the video and take a snapshot of the code.

If this video is helpful please encourage me with your support to make more interesting videos.

Please Like & Subscribe.
Thank You.


Watch video How To Change Cell Color When Cell Is Clicked Or Selected In Excel ? | Excel Tips & Tricks | online without registration, duration hours minute second in high quality. This video was added by user Dot.Computer 14 November 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 17,31 once and liked it 12 people.