Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formatting in BOLD and RED in cell | Excel Discussion (Misc queries) | |||
Formula to identify character formatting (bold, italic, etc) | Excel Worksheet Functions | |||
Conditional formatting numbers inputted to bold | Excel Worksheet Functions | |||
Conditional formatting? Bold | Excel Worksheet Functions | |||
Bold Text Formatting | Excel Discussion (Misc queries) |