This VBA code only apply to the worksheet you choose in the above step 2.
ColorIndex = 6 color to other color you like. And it will be dynamically moved as the selected cell changes. Then press the Alt + Q keys together to return to the worksheet, now when you select a cell, the entire row and column of this cell has been highlighted. Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)ģ. VBA code: auto-highlight row and column of selected cell Then copy and paste following VBA code into the blank code window: Open the worksheet you will auto-highlight the row and column of active cell, right click the sheet tab and select View Code from the context menu.Ģ. The following VBA code can help you automatically highlight the entire column and row of the current cell in worksheet, please do with following steps:ġ.
One click to highlight row and column of selected cell Here, I can introduce you some interesting tricks to highlight the row and column of the current cell, when the cell is changed, the column and row of the new cell are highlighted automatically as following screenshots:Īuto-highlight row and column of selected cell with VBA code When you view a large worksheet with numerous data, you may want to highlight the selected cell’ row and column so that you can easily and intuitively read the data to avoid misreading them.
How to auto-highlight row and column of active cell in Excel?