Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Logical function for finding different formated cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SP - 23 Oct 2007 09:46 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.