PC Review


Reply
Thread Tools Rate Thread

conditional formatting: if no formula, set fontface to bold

 
 
John Smith
Guest
Posts: n/a
 
      29th Nov 2006
I would like to set a cell's fontface to bold if it contains no
formula. I selected format/conditional formatting... then "formula
is" and left the other box blank. This does not do what I want it
to do.

What is the proper way of doing it? Thanks.
 
Reply With Quote
 
 
 
 
Gary Keramidas
Guest
Posts: n/a
 
      29th Nov 2006
you can give this try.

just use a range if you want to narrow it down

Sub Formula_bold()

Dim cell As Range
Application.ScreenUpdating = False
ActiveSheet.Unprotect
For Each cell In Cells.SpecialCells(xlFormulas, 23)
cell.Font.Bold = True
Next cell

Application.ScreenUpdating = True
End Sub



--


Gary


"John Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I would like to set a cell's fontface to bold if it contains no
> formula. I selected format/conditional formatting... then "formula
> is" and left the other box blank. This does not do what I want it
> to do.
>
> What is the proper way of doing it? Thanks.



 
Reply With Quote
 
MarMo
Guest
Posts: n/a
 
      29th Nov 2006
John,
As far as Iknow , you will not be able to achive this with the conditional
formatting tool.
Instead you should create a tool yourself in VBE
Something like :

Sub SetConFormat()
If ActiveCell.HasFormula Then
ActiveCell.Font.Bold = True
End If
End Sub

You could use this in a do... loop to set a area of cell in this format

Hope this will help
Mario

"John Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I would like to set a cell's fontface to bold if it contains no
> formula. I selected format/conditional formatting... then "formula
> is" and left the other box blank. This does not do what I want it
> to do.
>
> What is the proper way of doing it? Thanks.



 
Reply With Quote
 
JMay
Guest
Posts: n/a
 
      29th Nov 2006
Created this UDF (In a standard module):

Public Function HasNotFormula(rngCell As Range) As Boolean
On Error Resume Next
If Left$(rngCell.Formula, 1) <> "=" Then
HasNotFormula = True
End If
End Function

Then in the Conditional Formatting Box:
Formula IS =HasNotformula(A1) Format...
Select Bold
OK Out

HTH

"John Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> I would like to set a cell's fontface to bold if it contains no
> formula. I selected format/conditional formatting... then "formula
> is" and left the other box blank. This does not do what I want it
> to do.
>
> What is the proper way of doing it? Thanks.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting BOLD Shhhh Microsoft Excel Discussion 2 29th May 2009 12:37 PM
Counting Cells which have Bold & Red Strike Effect Through Conditional Formatting Akash Microsoft Excel Programming 2 28th Jun 2007 08:18 AM
Conditional formatting numbers inputted to bold =?Utf-8?B?dG1qdDIx?= Microsoft Excel Worksheet Functions 2 5th May 2007 12:29 AM
Re: Conditional formatting? Bold Roger Govier Microsoft Excel Worksheet Functions 3 19th Dec 2006 09:06 PM
Use Conditional Formatting to Bold Font =?Utf-8?B?U2FyYWg=?= Microsoft Access Form Coding 3 10th May 2006 04:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:38 AM.