Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel If Statement Based On Format 1

Status
Not open for further replies.

jonbatts

Programmer
Apr 12, 2005
114
US
Is there a way to say "IF A1 is Bold THEN 'It's Bold' ELSE 'It's Not Bold'". Obviously the Excel Formula would look something like [tt]=IF(A1.font = "BOLD", "It's Bold", "It's Not Bold")[/tt]It's the ".font = "BOLD" part that I'm not sure how to do. Thanks a lot.
 
No, not easily. And no, not easily at all if the Bold is the result of Conditional Formatting. You will most likely require VBA code to do this ( the actual code might be quite simple ).

So, is the Bold formatting the result of Conditional Formatting? If so, then use the condition test in a formula to get your answer.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 




Hi,

There is no way to get a format with native spreadsheet code.

Insert this function in a module (preferable in your Personal.xls)
Code:
Function IsBold(rng As Range)
    If rng.Font.Bold Then
        IsBold = True
    Else
        IsBold = False
    End If
End Function
You can use like any other IS Function

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top