• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using IF on manually formatted cell

sparkyvega

New Member
I have cells in a column some of which are manually formatted in bold. I can't use conditional formatting in this case. I would like to use an IF function based upon whether or not the cell is in bold.


Example: IF cell A1 is in bold format, then "TRUE".


Is this possible? Any other suggestions on how to make this work? Thanks in advance.
 
Hi Sparkyvega,


You may still use CF on the cell and set other formats or reset the Bold format.


What are you trying to achieve?


kanti
 
Sparkyvega

You could use a Function like

[pre]
Code:
Function isBold(ByRef MyRange As Variant) As Boolean
isBold = False
If MyRange.Font.Bold = True Then isBold = True
End Function
[/pre]

Copy and past the above code into module in VBA


and then in your spreadsheet use

=isBold(A1)

etc
 
Thanks for the tip Hui, but I was trying to do this without macros because the file is shared. I'll just have to figure something else out...
 
I figured out a fix for this. Instead of making the cells of interest in BOLD, I formatted them "centered". The CELL function returns the carat ^ symbol when TRUE. Now I got what I needed.


=IF(CELL("prefix",C66)="^",K66,"")


-sparkyvega
 
Back
Top