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 / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Using font elements as condition criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StorageHawk - 22 May 2008 21:16 GMT
Does anyone know how to use font elements like bold, italic, underline, etc.
as  criteria for a formula to return the value from a cell? I am trying to
use bold $ values as the criterion for pulling the $ value into another cell.
I can do the entire column but all I want are the cells with totals and not
the individual component sales figures. This is in a very large spreadsheet
and was already formatted when I received it, so I just wanted to gather the
data I want and pull it into another column. ???? Thanks in advance for any
help.
Gary''s Student - 22 May 2008 22:47 GMT
Here is part of your answer.  We create a UDF that will return 1 if the
reference is currency and the font is bold:

Function hawk(r As Range) As Integer
v = r.Text
If Left(v, 1) = "$" And r.Font.Bold = True Then
   hawk = 1
Else
   hawk = 0
End If
End Function

So if A50 is dollars/bold then
=hawk(A50) will give a 1.

Is this of any help??
Signature

Gary''s Student - gsnu200787

> Does anyone know how to use font elements like bold, italic, underline, etc.
> as  criteria for a formula to return the value from a cell? I am trying to
[quoted text clipped - 4 lines]
> data I want and pull it into another column. ???? Thanks in advance for any
> help.
StorageHawk - 22 May 2008 23:28 GMT
I will have to try that and see if I can get the answer to pick up the value
in that cell. Thanks.

> Here is part of your answer.  We create a UDF that will return 1 if the
> reference is currency and the font is bold:
[quoted text clipped - 21 lines]
> > data I want and pull it into another column. ???? Thanks in advance for any
> > help.
 
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.