Please help translate the following

B

Brian

in A1:

If B1 contains bold text then A1 = B1 otherwise A1 is blank.

Thank you for any help
 
M

Max

Brian said:
in A1:
If B1 contains bold text then A1 = B1 otherwise A1 is blank.

Assuming you mean: IF cell B1 is formatted as bold,
we could try the UDF below from a post by Ron Rosenfeld
re: http://tinyurl.com/z2dmb

To install the UDF:
Press Alt + F11 to go to VBE
Click Insert > Module
Copy & paste the UDF below into the code window

'-----
Function IsBold(rg As Range) As Boolean
Application.Volatile
IsBold = rg.Font.Bold
End Function
'-----

Press Alt+Q to get back to Excel

Then put in A1:
=IF(isbold(B1),B1,"")

Copy A1 down as may be required

Press F9 to force-calculate
 
B

Brian

B1's font is made bold via conditional formatting which is not recognized as
bold by the formula you provided. I checked B1 and found that although cond
formatting made content of B1 bold it still indicated in the format menu as
regular. So therefore the formula is not finding any cells to be bold even
though they may appear to be.

can something be added to fix this problem?

Thank you

Brian
 
P

Peo Sjoblom

Us the same condition as you use when you bold the font

=IF(A1>5,B1,"")

as an example where the condition is >5

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey
 
M

Max

Yes, the UDF doesn't work for CF,
as pointed out by Ron in his post
(you didn't say the "bold" was coming from CF
in your orig. post)

If it's meant to reproduce the CF condition,
it's simpler, as per example posted by Peo
 
Top