Excel 2007 Conditional formatting based on a function value.

Hi,

I am trying to work out how to do this in Excel 2007.

I would like to do a conditional formatting based on a return
value of a function.

If the function returns "True". I want the cell formatted as green.
If the function returns "False", I want the cell formatted as red.

So I have created the VBA function, what I am stuck on is how to do the
conditional formatting in Excel 2007.

I am looking for the basic steps.

Thanks,

Ward.

 
LVL 1
whorsfallAsked:
Who is Participating?
 
gowflowCommented:
Check out this file it has conditional formating in Col A as you requested to view the format available from the Home Menu choose Conditional Formating dropdown arrow and choose Manage Rules you will see how I set it up.

Pls feel free to ask more if you need help or adpatation with your own workbook
gowflow
TrueFalse-Cond-formating.xlsx
0
 
andrewssd3Commented:
On the Home tab - conditional formatting, then New rule... and choose 'Use a formula to determine which cells to format.  Then you can enter your function, and select the formatting you want
0
 
whorsfallAuthor Commented:
Hi,

Thanks for that but I am a bit confused. I can see how to set the formatting for true,
but how then do I format it for False?

Thanks,

Ward.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
gowflowCommented:
did you check the file I posted ?
gowflow
0
 
Richard DanekeTrainerCommented:
You use two conditional formatting rules.
One rule for TRUE and one rule for False.
   OR - you can format the cell for FALSE and only test for TRUE.
0
 
gowflowCommented:
I presume you have loaded the file I posted
1) once loaded goto menu Home and click on the arrow under Conditional formating
2)Select Manage rules
3) you will see 2 rules the first one Cell Value = FALSE then Red color and the second one Cell value = TRUE then Green color.
4) if you want to modify this click on the rule you want click edit then you will see the data and can change the conditio nand the color.

gowlfow
0
 
gowflowCommented:
Again when you say
but how then do I format it for False?
If your confused on how empty cells are turned Red is that by delfault empty = 0 = false so if your not happy with all cells turning red by default then change the output of your formula to be say Yes and No and then affect Yes to Green and No to Red this way only input of formula will be colored and empty cells will remain blank !!!
gowflow
0
 
whorsfallAuthor Commented:
Excellent !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.