On Apr 28, 1:22 pm, Helmut Weber <nbhymsjxd...@mailinator.com> wrote:
> Hi,
>
> something along these lines:
>
> Public Function SameFormat(s As Range, t As Range) As Boolean
> ' s = source range
> ' t = target range, the reference cell's range
> SameFormat = True
> If s.Font.Italic <> t.Font.Italic Then
> SameFormat = False
> Exit Function
> End If
> If s.Font.name <> t.Font.name Then
> SameFormat = False
> Exit Function
> End If
> If s.Font.Size <> t.Font.Size Then
> SameFormat = False
> Exit Function
> End If
> If s.Font.Bold <> t.Font.Bold Then
> SameFormat = False
> Exit Function
> End If
> ' more if you like
> End Function
> ' ---------------------
> Sub Test5555()
> MsgBox SameFormat(Cells(1, 1), Cells(1, 2))
> End Sub
>
> --
>
> Helmut Weber
>
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
I will try that thanks
|