Highlight Current Row In Excel For Mac

Click a cell in one of the columns that you want to sort. On the Data tab, under Sort & Filter, click the arrow next to Sort, and then click Custom Sort. To add another sorting criteria, click Add Level. If the table has a header row, select the My list has headers check box. 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: 1. 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. Then copy and paste following VBA code. Select a row by clicking on the row number. You should see the row number on the far left of the sheet. The new row will appear above the selected row or rows. Highlight the same number of rows as you want to add. So to add one row, highlight just one row, to add 2, highlight 2 rows, etc.

Extend selection to the end of column of row with shortcut key. The following shortcut keys help you extending selection to end of column or row in Excel. Select the first or any cell of the column or row, and then press the keys simultaneously. Then you can see the selection is extended to the end of current column as below screenshot shown. Microsoft Excel: Highlight the current row and column. Excel Details: Microsoft Exel is a powerful tool to handle tons of data. But often, I see people make mistakes because they switch between rows. These kind of mistakes occur because Excel does not highlight the row of the active cell.

During some experimenting with various ways of expressing the range, when looking in the event log (at the bottom of the Script Editor window), I noticed that the references to the cells being selected were in the format of $A$3,$B$50, rather than $A$3:$B$50. It looks like the comma indicates non-contiguous selections while the semicolon indicates a continuous block of selection from the first cell specified to the second. Pasting each into my script confirmed this. But I haven't worked out how to effect the necessary behaviour.


For


Highlight Current Row In Excel For MacRowHighlight

What I have figured out is a workaround which seems to do the job I want without any unwanted side-effects. In the original files being imported the first two rows contain header information (descriptions, dates, etc.) which needs to be retained, with the actual data (which the chart would then use) starting on the third row. Because the top left cell of the data will always start in the same location in all the text files I have decided to format the text files so that there is an empty row after the first two rows (first data cell is now A4 instead of A3). Then I can use the following lines to select the data cells without even having to work out how many there are:


tell application 'Microsoft Excel'

activate

Highlight Current Row In Excel For Mac

select range 'A4'

select current region of active cell

end tell


To quote from the Excel 2004 AppleScript Reference PDF: 'The current region property returns a range of cells bounded by blank rows and columns'. In other words, by selecting the first data cell and then the current region, the selection is expanded until it encounters an empty row or column. By separating the data from the header rows, there is a blank row above the data, so only the data is selected.


Mission accomplished, in terms of achieving a workable solution. However, I am still very curious about the reason for the happenings as described in my first post. If anybody knows why, I am quite keen to be educated.

Aug 19, 2011 6:34 AM

Microsoft Exel is a powerful tool to handle tons of data. But often, I see people make mistakes because they switch between rows. These kind of mistakes occur because Excel does not highlight the row of the active cell. The cell that is selected is being indicated, but without real highlighting.

Excel: No row and column highlighting for the active cell

Recently, I was looking for real row highlighting in Excel. This means I wanted a background colour for the current row that was selected, so it was clearly marked which row and column was currently being edited. Ultimately, I found a solution using VB (Visual Basic). This is the result I achieved using a fairly easy piece of code:

Excel: Row and column highlighting for the active cell by using a background colour.

First, you want to enable the developer tab. To do so, go to File > Options and go to Customize the ribbon. In that list, tick the Developers box.

Now, close the options menu and open the developer tab; now click on Visual Basic. For each of the worksheets, paste the following VBA code.

As seen in the images above, this code will give a yellow background colour to indicate the row and column. If you want, you can choose your own colour, see the ColorIndex Property documentation on the Office Dev Center. A red highlighting colour would mean you change the numerical value to your preferred value, in this case 3.

Save the code. Excel will prompt you to save your document as a Excel document with the .xlsm file extension. This type of file is in essence the same as a regular .xls(x) file, but with the addition of a vbaProject.bin file containing functions and macros.

Highlight Current Row In Excel For Macbook

If the file is saved, you successfully got what you wanted: row highlighting in Excel!

Highlight Current Row In Excel For Mac Shortcut

This guide should apply to Microsoft Excel 2007, Excel 2010, Excel 2013 and Excel 2016.