Hi,
I am interesting in such question:
I have table with two types of cell formating, one with font 12 and one
with font 10. Is there a function to do something like this:
= IF (in target cell font is 12, result A)
= IF (in target cell font is 10, result B)
Thanks,
Svilen
Gary''s Student - 23 Oct 2007 10:32 GMT
Say we want to test the font size in A1.
First install this tiny UDF:
Function fontsize(r As Range) As Integer
fontsize = r.Font.Size
End Function
then in another cell:
=IF(fontsize(A1)=11, "result A","result B")

Signature
Gary''s Student - gsnu2007
> Hi,
> I am interesting in such question:
[quoted text clipped - 7 lines]
>
> Svilen
SP - 23 Oct 2007 14:09 GMT
> Say we want to test the font size in A1.
>
[quoted text clipped - 7 lines]
>
> =IF(fontsize(A1)=11, "result A","result B")
Thank you very much for the formula code!
Do you have an idea how to do it for colors as well? I mean, the color
of background and/or the color of font.
Svilen
Pete_UK - 23 Oct 2007 10:47 GMT
There is no in-built function to return the font size. You would need
a user-defined function in VBA.
Hope this helps.
Pete
> Hi,
> I am interesting in such question:
[quoted text clipped - 7 lines]
>
> Svilen