You could write a simple function and place it in a module:
Public Function Fontrprt(strCell) As String
Fontrprt = strCell.Font.Name
End Function
Then, in your workbook you could enter
=Fontrprt(A1)
to get the font used in cell A1. The function will return an error if you
have it act on a cell with more than one font used.
Function fontinfo(cell As Range) As String
fontinfo = cell.FONT.Name & " -- " & cell.FONT.Size
If Left(cell.FONT.FontStyle, 7) = "Regular" Then
fontinfo = Trim(fontinfo & Mid(cell.FONT.FontStyle, 8, 100))
Else
fontinfo = Trim(fontinfo & " " & cell.FONT.FontStyle)
End If
End Function
An example of use, depending on what font you actually used in your
table the formula shown might be substituted by something such as:
Arial -- 12 Bold
Webdings -- 12
Wingdings 2 -- 12
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.