Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default conditional formatting: if no formula, set fontface to bold

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default conditional formatting: if no formula, set fontface to bold

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" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default conditional formatting: if no formula, set fontface to bold

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" wrote in message
...
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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default conditional formatting: if no formula, set fontface to bold

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" wrote in message
:

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
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
formatting in BOLD and RED in cell C02C04 Excel Discussion (Misc queries) 2 December 16th 08 01:42 AM
Formula to identify character formatting (bold, italic, etc) alphaorionis Excel Worksheet Functions 3 July 1st 07 11:19 PM
Conditional formatting numbers inputted to bold tmjt21 Excel Worksheet Functions 2 May 5th 07 12:29 AM
Conditional formatting? Bold Inspector Excel Worksheet Functions 8 December 19th 06 09:15 PM
Bold Text Formatting reno Excel Discussion (Misc queries) 2 October 18th 06 04:29 PM


All times are GMT +1. The time now is 09:12 AM.

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"