Solved

Conditional Formatting in excel Based - Cells with and without Formulas

Posted on 2011-03-22
4
221 Views
Last Modified: 2012-05-11
1. i need a CF to color cells without formulas  column 1
2. i need a CF to color cells with formulas       column 2
0
Comment
Question by:ansonindustries
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 35193744
0
 
LVL 33

Accepted Solution

by:
jppinto earned 500 total points
ID: 35193776
I've attached a working sample. I've used a UDF in VBA:

Function CellFormula(cel As Range) As String
    CellFormula = cel.Formula
End Function

This function will return the formula on a cell. Using this function on a Conditional Formatting rule, I check if the cell has a function (checking if it begins with a =) and on the first column, if it doesn't have a formula, I change the color (to yellow) on the second column, I check if it has a formula and if true change the color to orange.

Hope this is clear.

jppinto
ConditionalFormatting.xlsm
Capture.JPG
0
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 35193814
Replace with =NOT(IsFormula($B$3)) for the opposite function. ( is not the formula) select desired color
0
 

Author Closing Comment

by:ansonindustries
ID: 35194120
Thanks works great!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question