View Full Version : Finding itallics


gpurger
12-09-2005, 01:12 AM
Hi,
is there a way in excel 2000 to find if part of the information in a cell is in itallics or not.

Cheers

G

shades
12-09-2005, 05:37 AM
Howdy. This is a function in VBA, that you can access as any other function in Excel.


Function ISITALIC(cell) As Boolean
'Returns TRUE if cell is italic
'Returns error if the cell is mixed
ISITALIC = cell.Range("A1").Font.Italic
End Function


The following will return TRUE if all characters are italic.


Function ALLITALIC(cell) As Boolean
'Returns TRUE if all characters in cell are italic
If IsNull(Cell.Font.Italic) Then ALLITALIC = False
Else
ALLITALIC = cell.Font.Italic
End If
End Function