Selected Cells Not Shaded

by Allen Wyatt
(last updated September 3, 2015)

3

Ted just switched to Excel 2007. Whenever he select multiple cells, all the cells are white, not shaded blue as in previous versions of Excel. This means he cannot tell which cell is the active cell. When Ted uses the Ctrl key to select multiple cells in different parts of the worksheet, he cannot even tell which cells have been selected. Ted wonders how he can get Excel 2007 to shade selected cells as was done in previous versions of the program.

The short answer is that you can't. In fact, it appears that the coloring of many parts of Excel (including selections) are hard-coded. In previous versions of Excel you could change the colors in Windows itself; this won't really affect Excel 2007 that much.

The problem, has been known since the earliest betas of Excel 2007, and still Microsoft has done nothing to fix it. There is an interesting blog post over on the MSDN (Microsoft Developer Network) site that talks about this issue and provides a few workarounds:

http://blogs.msdn.com/excel/archive/2008/04/22/improving-sheet-selection.aspx

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6232) applies to Microsoft Excel 2007.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Pictures Move on their Own

Insert some pictures into a document, and you may be in for a surprise—they don't necessarily stay where you put ...

Discover More

Default Cell Movement when Deleting

Delete a cell or a range of cells, and Excel needs to figure out how to rearrange the void left by the deletion. You can ...

Discover More

Moving Cell Borders when Sorting

Sort your data and you may be surprised at what Excel does to your formatting. (Some formatting may be moved in the sort ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Turning Off Error Checking

A little green triangle in the corner of a cell means that Excel thinks there is an error with the cell contents. If ...

Discover More

Changing the Ribbon's Size and Look

The Ribbon, while debatably handy, can be downright difficult to use for those with a sight impairment. Here are some ...

Discover More

Getting Audible Feedback

Want to get a little bit of sound with your data? Excel can provide audible feedback that you may find helpful. Here's how.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 + 9?

2019-04-02 16:10:33

Thomas Papavasileiou

In case you would like to see stat results that respond to any modifications (Active results), you can use a macro that displays the stats, based on a formula.
The relevant macro was posted by Mr.Excel (see https://www.youtube.com/watch?v=cWZ8nieutjk) and here is the code.

Sub quickstats_as_formulas()

ma = Selection.Address
ms = "For range" & vbTab & ma & vbCr
ms = ms & "Average: " & vbTab & "=average(" & ma & ")" & vbCr
ms = ms & "Count: " & vbTab & "=count(" & ma & ")" & vbCr
ms = ms & "CountA: " & vbTab & "=counta(" & ma & ")" & vbCr
ms = ms & "Min: " & vbTab & "=min(" & ma & ")" & vbCr
ms = ms & "Max: " & vbTab & "=max(" & ma & ")" & vbCr
ms = ms & "Sum: " & vbTab & "=sum(" & ma & ")" & vbCr

Dim dataobj As New MSForms.DataObject
dataobj.SetText ms
dataobj.PutInClipboard

End Sub

Any error cells within the selection will result in some errors. if you want to check the existence of any error cells and prohibit the further execution of the macro, you can add the following code lines at the top of the code:

On Error Resume Next
fe = 0
ce = 0
With Selection
fe = .SpecialCells(xlCellTypeFormulas, 16).Count 'Formula errors
ce = .SpecialCells(xlCellTypeConstants, 16).Count 'Constant errors
End With
If fe > 0 Or ce > 0 Then
txt = "Selection contains " & fe + ce & " errors." & vbCr
txt = txt & "Macro ends!"
ttl = "Correct the errors and rerun..."
MsgBox txt, vbOKOnly + vbCritical, ttl
Exit Sub
End If
On Error GoTo 0


2019-04-01 03:28:58

Gerhard Seljehammer

Allow me to recommend ASAP Utilities. There is a function that lets you copy from the task bar with a click of the mouse. It has also a ton of other very useful functions.
I have no connection to the people behind ASAP Utilities, but I am a dedicated user for years. It has saved me lots of time.

Best regards
Gerhard


2019-03-30 13:19:16

Willy Vanhaelen

If your selection has hidden rows and/or columns, those macros will not produce a result corresponding to what is displayed in the Status Bar(at the bottom of the worksheet) which only takes into account the visible cells while the WorksheetFunction takes all cells of your selection.

To fix this in the second macro replace:
Set R = Selection
with
Set R = Selection.SpecialCells(xlCellTypeVisible)

In the first macro add this line somewhere before Select Case:
Set R = R.SpecialCells(xlCellTypeVisible)

As for the formula, better use =SUBTOTAL( 5,B3:B7) instead of=MIN(B3:B7)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.