need to change writing to bold by only typing, not changing cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to be able to change different cells in a workbook on Excel to bold
without having to type in the change then going to click bold to highlight.
Is there a way to change the "pen" to only type bold in the different cells
without having to go back and forth to type and then stopping and hitting the
bold on each cells. Cells start as plain type, they are all over a spread
sheet, different rows and columns, but I don't want the whole row or column
to go to bold only the cell that I have changed.
 
You could use event code to operate only upon the cells that get changed by your
typing or by F2>Enter

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column > 8 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Font.Bold = True
ErrHandler:
Application.EnableEvents = True
End Sub

This code operates on columns A:H. Change the >8 to a higher number if you want
more columns included.

Worksheet event code is placed in a sheet module.

Right-click on the sheet tab and "View Code" Paste the above into that module.


Gord Dibben MS Excel MVP
 
Back
Top