Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Paul
 
Posts: n/a
Default If formulae using formats

Hi,
I want to write a formula along the lines of:

=if( b2 is bold, b2, else "")

Any ideas would be welcome.

PS the Excel is 2002.
Thanks for looking

Paul
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Paul,

You could add a UDF like so

'-----------------------------------------------------------------
Function IsBold(rng As Range)
'-----------------------------------------------------------------
If rng.Areas.Count 1 Then
IsBold = CVErr(xlErrValue)
Exit Function
ElseIf rng.Cells.Count 1 Then
IsBold = CVErr(xlErrValue)
Exit Function
Else
IsBold = rng.Font.Bold
End If

End Function


and then use

=IF(IsBold(B2),B2,"")

but be aware that bold does not trigger the calculate event so if B2 is
changed, you formula will not update.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Paul" wrote in message
...
Hi,
I want to write a formula along the lines of:

=if( b2 is bold, b2, else "")

Any ideas would be welcome.

PS the Excel is 2002.
Thanks for looking

Paul



  #3   Report Post  
CLR
 
Posts: n/a
Default

If B2 is BOLD because of Conditional Formatting, then just replace the "B2
is bold" in your formula with whatever conditions actually make B2
BOLD.........but the BOLD will not carry through to your new result just
using a formula............also, you do not need the "else" in your
formula..........

Vaya con Dios,
Chuck, CABGx3


"Paul" wrote in message
...
Hi,
I want to write a formula along the lines of:

=if( b2 is bold, b2, else "")

Any ideas would be welcome.

PS the Excel is 2002.
Thanks for looking

Paul



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
Copy with link between sheets - all the formats dissapear?!? Kathrine Excel Discussion (Misc queries) 1 February 4th 05 03:45 PM
How can I know the no of different cell formats in a Excel workbo. Sunil Excel Discussion (Misc queries) 1 January 31st 05 05:23 PM
vlookup change column index position - without changing formulae loopyloobyloo Excel Worksheet Functions 1 November 26th 04 01:35 PM
Too Many Different Cell Formats Nanette Excel Worksheet Functions 7 November 15th 04 08:53 PM
Too Many Different Cell Formats Nanette Excel Worksheet Functions 1 November 12th 04 04:55 AM


All times are GMT +1. The time now is 05:16 AM.

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"