Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If Function, looking for formats in values

How would I write an IF function to check to see if a cell is in Italics and
if it is make another cell = 0


IF(A1???, B1=0) Anyone know what to put where the ?s are?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default If Function, looking for formats in values

Try this small macro:

Sub routine()
If Range("A1").Font.FontStyle = "Italic" Then
Range("B1").Value = 0
End If
End Sub

--
Gary''s Student - gsnu200731


"ManBoy86" wrote:

How would I write an IF function to check to see if a cell is in Italics and
if it is make another cell = 0


IF(A1???, B1=0) Anyone know what to put where the ?s are?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default If Function, looking for formats in values

Or try this:

Function IsItalic(mCell As Range) As Boolean
IsItalic = mCell.Font.Italic
End Function

And then type in B1:

=IF(IsItalic(A1),0,"Not italic in A1")




"ManBoy86" wrote:

How would I write an IF function to check to see if a cell is in Italics and
if it is make another cell = 0


IF(A1???, B1=0) Anyone know what to put where the ?s are?

Thanks.

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
How to get different text formats in a concatenate function Evelyn Excel Discussion (Misc queries) 3 June 8th 07 04:39 PM
how to copy only values and formats of worksheets to new workbook rvd Excel Worksheet Functions 3 January 31st 07 12:43 PM
Conditional Formats for formulae and values GrahamB Excel Worksheet Functions 5 January 14th 07 03:49 PM
Custom number formats in TEXT function MatthewB Excel Worksheet Functions 4 June 28th 06 09:05 PM
Copy Color Formats Based On Column Date Values Naji Excel Discussion (Misc queries) 0 January 11th 06 09:06 PM


All times are GMT +1. The time now is 05:15 PM.

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

About Us

"It's about Microsoft Excel"