Excel 2002: Is there a way to default font for pasted data ?

G

Guest

Dear Sir,

I have successfully default every new worksheet I open with blue color MS
San Serif 8 pt font. Any direct data entry to this worksheet will have this
font default.

But whenever I copy some data with other font types and paste it to the
worksheet, the default font settings does not apply.

I need to reset the font to my default each time I paste the data from other
sources.

Is there a way to enable the pasted data to follow my default font ?


Thanks

Low
 
G

Gord Dibben

Mr. Low

Paste this event code into the sheet module.

Private Sub Worksheet_Change(ByVal Target As Range)
'retain formatting when a cell or cells is/are copied over
Dim myValue
With Application
.EnableEvents = False
myValue = Target.Value
.Undo
Target = myValue
.EnableEvents = True
End With
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top