how do i automatically format repeated text

M

Mel

Please can someone tell me how to automatically format text that is repeated
throughout my spreadsheet e.g. Payment Received.

Many thanks.
 
J

Joel

One way is to use on the Edit Menu the Paste Special. Copy the cell with the
format you want, the go to Paste Special and select format only.
 
G

Gord Dibben

Mel

I assume you want to type "payment received" and have it change to "Payment
Received".

The string of text "Payment Received" is not a format that can be transferred
to others cells.

You would need code to do this. One version could be..................

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column > 255 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
If Target.Value = "payment received" Then
Target.Formula = Application.Proper(Target.Formula)
End If
ErrHandler:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that sheet module.


Gord Dibben MS Excel MVP
 
Top