I would like excel to bold the entire row when a cell is selected, but it should go back no its normal formatting when the cell is not longer selected.
I saw something like this in the forum, but now I can't seem to find it.
this one does cross hairs. I don't remember the author
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
' Wipe out existing formatting
' Note: this wipes out all existing interior cell colors!
Cells.Interior.ColorIndex = xlNone
' Color the Active Row
With ActiveCell.EntireRow.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
' Color the Active Column
With ActiveCell.EntireColumn.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
End Sub
This might be terribly wrong (causing some other problem), but this seemed to work for me... Paste the code into the objecy module of the Sheet you are working with...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static lastrow As Long
On Error Resume Next
Range(lastrow & ":" & lastrow).EntireRow.Font.Bold = False
Target.EntireRow.Font.Bold = True
lastrow = Target.Row
End Sub
What if you ALREADY have Required Bolding in affect in an area of your sheet
and you select it. Wont this destroy the original bolding effect? Hummmmm...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.