Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Excel 2007 and IF formulas

If that other cell is bolded by formatting (not conditional formatting), then
you could use userdefined function.

Option Explicit
Function IsBold(rng As Range) As Boolean
Application.Volatile

Dim ChkBold As Variant

Set rng = rng.Cells(1)
ChkBold = rng.Font.Bold

IsBold = False
If ChkBold = True Then
IsBold = True
End If

End Function

And changing the format of the cell won't change the results of this formula.
You'll have to force a recalc before you can trust the results.

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

========
Short course:

Open your workbook.
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (yourfilename.xls)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Now go back to excel.
Into a test cell and type:
=IsBold(a1)
Where A1 contains the value to check.

===========
Now you can use this UDF in your Conditional formatting formula is rule:

=isbold(a1)
(if you're checking A1)

pgarcia wrote:

Is there an IF formula in 2007 that if a cell to the right or left is BOLD
then it will BOLD that cell?

Thanks


--

Dave Peterson
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
Formulas do not work in Excel 2007 Neal Excel Discussion (Misc queries) 4 October 16th 08 02:56 PM
excel 2007 formulas Dale Excel Worksheet Functions 2 July 28th 08 07:16 PM
Excel 2007 formulas Chub822 Excel Discussion (Misc queries) 8 September 15th 07 10:16 AM
Formulas in excel 2007 donna Excel Discussion (Misc queries) 4 August 10th 07 02:52 PM
excel 2007 formulas Anvil22 Excel Worksheet Functions 6 May 9th 07 07:29 PM


All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"