
- #NEOOFFICE SPREADSHEET EVERY OTHER LINE HIGHLIGHT HOW TO#
- #NEOOFFICE SPREADSHEET EVERY OTHER LINE HIGHLIGHT CODE#
In this example, the data is in Sheet 1 and Sheet 2.

#NEOOFFICE SPREADSHEET EVERY OTHER LINE HIGHLIGHT CODE#
Here are the steps to copy this VBA code in the backend: During copy paste, the application is not refreshed and it is allowed. It forces the workbook to recalculate, which then forces the conditional formatting to highlight the active row and the active column. Normally (without any VBA code) a worksheet refreshes only when there is a change in it (such as data entry or edit).Īlso, an IF statement is used in the code to check if the user is trying to copy paste any data in the sheet. The above VBA code is run whenever there is a selection change in the worksheet. Here is the VBA code that you can copy and paste (exact steps also listed below): Private Sub Worksheet_SelectionChange(ByVal Target As Range) However, to make this work, you need to place a simple VBA code in the backend. The above steps have taken care of highlighting the active row and active column (with the same color) whenever there is a selection change event.

Select the data set in which you to highlight the active row/column.Here are the steps to highlight the active row and column on selection:
#NEOOFFICE SPREADSHEET EVERY OTHER LINE HIGHLIGHT HOW TO#
Now let’s see how to create this functionality in Excel.ĭownload the Example File Highlight the Active Row and Column in Excel This can be helpful when you’re working with a large dataset and can also be used in Excel Dashboards. In the above example, as soon as you select a cell, you can see that the row and column also get highlighted. Let me first show you what we are trying to achieve. In case you prefer written instructions, below is a tutorial with exact steps on how to do it. It will save me some time and help the readers too.īelow is a video where I show how to highlight the active row and column in Excel. So I decided to create a tutorial and a video on it. One of the Excel queries I often get is – “How to highlight the Active Row and Column in a data range?”
