When Excel window loses focus, the cursor becomes invisible. Also coloring of the respective column/row headers is back to default, so it's impossible to locate cursor and/or selection as soon as I switch to other window.

This annoys the hell out of me as it makes Excel almost unusable for most of tasks I need it for:

  • keeping track of test cases while performing testing in another window

  • obtaining data somewhere else and porting it to Excel

(I have never seen such behavior in other applications and can't even think of a justification for it.)

Is is possible to turn this behavior off, i.e. retain selection visibility when out of focus?

Edit: Contrary to what I thought when originally posted this, this is not a "new feature", it's rather a UI pragma that MS holds to in most their applications (at least since some point in time), although non-MS applications or some legacy MS applications do not always respect it.

  • 1
    I agree, someone what not thinking about the use-cases for excel when they made that the default behavior. – AnthonyVO Mar 31 '15 at 15:07

One workaround is described in this post, which does not require usage of VBA/macros:

Copying content to the clipboard will put a dashed border around the highlighted cells, which will still remain when the Excel windows loses focus.

Highlight the concerned row by clicking the row number to the left of the row, then click Ctrl-C / Cmd-C.

  • Nice, simple workaround. – 101100 Dec 1 '15 at 16:28

That is a normal behavior for Windows. It is not specific to Excel. The same thing happens if you select text in Word, then change windows. It can not be turned off.

If you are willing to add macros to your workbook, there is a work-around to highlight the row you need, then remove it when you are done. The highlighted row will show when the window does not have focus.

Add these pieces of code in the VBA Explorer (Alt+F11) to ThisWorkbook and you can either call them from macros (Alt+F8) or add buttons for them.

Sub RowHighlight()
  With Selection.Interior
    .Pattern = xlSolid
    .ColorIndex = 6  'Change this number to the color of choice.
  End With
End Sub

Sub RemHighlight()
  With Selection.Interior
    .Pattern = xlNone
  End With
End Sub

Below is an index of colors you can change in the code. Currently set to Yellow.

enter image description here

  • Interesting idea. You have to be careful doing this though because this will cause you to lose any fill formatting you have in the active row. Also, it would be more useful to have this associated with a worksheet event -- otherwise it would make more sense just to manually change the fill color every time you need to track your active cell while in another window. – Excellll Nov 6 '12 at 17:26
  • 2
    "That is a normal behavior for Windows. It is not specific to Excel." You are right that it's not specific to Excel---indeed, Word behaves the same, but I would not call it normal. For example, it does not behave like this in Notepad or actually most programs I use (Notepad++, PSPad, Sumatra PDF reader). It does behave like this in native text fields like "Run...", though. (Soo weird I never noticed that.) – Alois Mahdal Nov 6 '12 at 17:28
  • The OSX version of Excel is implemented in exactly the same way, limiting its usability as mentioned by the OP. – rexford Aug 19 '14 at 10:59
  • @CharlieRB Nope, this is not the behaviour of the operating system and the behaviour in Excel is different than in Word. Word uses a text field with a cursor and the cursor wont blink if window looses focus. That's ok since I can manually mark some text. In Excel however, this is completely different. It uses its own drawing mechanism for the cells and it marks the special fields in column and row (with the yellow background). This is related to Excel only and it is a stupid behaviour. I too often have to copy / compare data from another window and there is absolutely no marking whatsoever... – StanE Feb 26 '16 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.