Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Using font elements as condition criteria

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Using font elements as condition criteria

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??
--
Gary''s Student - gsnu200787


"StorageHawk" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Using font elements as condition criteria

I will have to try that and see if I can get the answer to pick up the value
in that cell. Thanks.

"Gary''s Student" wrote:

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??
--
Gary''s Student - gsnu200787


"StorageHawk" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count if font and background color condition is true Ivano Excel Worksheet Functions 3 February 28th 08 06:08 AM
Condition font color in a single cell based on its formula data. Bee Excel Worksheet Functions 3 February 19th 08 12:09 AM
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
Criteria - Automatic Change Font or Fill Colour stevembe Excel Worksheet Functions 4 October 4th 05 04:43 AM
how do I change the font of a cell if it meets a certain criteria. Meaux Excel Worksheet Functions 3 November 19th 04 06:05 AM


All times are GMT +1. The time now is 02:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"