I have created a workbook and inserted a module in an attempt to show "TRUE" if the text in a cell is bold and "FALSE" if it isnt.
What I did was:
Press ALT + F11 to open the VBA window.
Click Insert - Module.
Entered
Code:
Public Function IsBold(c As Range) As Boolean
On Error GoTo Handler
IsBold = c.Font.Bold
Exit Function
Handler:
If Err.Number = 94 Then IsBold = True
End Function
I then used the IsBold function to test if a cell is bold.
=IF(ISBOLD(sheet1!A1),"TRUE","FALSE")
This works ok but when A1 is changed from BOLD to UNBOLD, the formula doesn't update and return the correct "TRUE" or "FALSE" text ?
What I did was:
Press ALT + F11 to open the VBA window.
Click Insert - Module.
Entered
Code:
Public Function IsBold(c As Range) As Boolean
On Error GoTo Handler
IsBold = c.Font.Bold
Exit Function
Handler:
If Err.Number = 94 Then IsBold = True
End Function
I then used the IsBold function to test if a cell is bold.
=IF(ISBOLD(sheet1!A1),"TRUE","FALSE")
This works ok but when A1 is changed from BOLD to UNBOLD, the formula doesn't update and return the correct "TRUE" or "FALSE" text ?