Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

vba Conditional Formatting if cell value < 19.5 or >20

Hi,
I need a module to color all used cells in column (H) depending on the following criteria:
If cell value less than 19.5 then cell font color = Red and bold
or
If cell value greater than 20 then cell font color = Green and bold

thanks
Peter
0
ptp2
Asked:
ptp2
  • 2
1 Solution
 
Rory ArchibaldCommented:
Does it have to be code rather than just applying conditional formatting?
0
 
ukerandiCommented:
Enter value in H column click on Run button
answerColor.xls
0
 
ptp2Author Commented:
Thanks for your quick response - another problem beaten!
0
 
ptp2Author Commented:
H ukerandii, I know I accepted your answer as the test data you sent worked perfectly exacly as I wanted but I have a problem in that the first cell in column H contains header information and when I run the module I get an error Run Time error 13 Type mismatch on line val1 = Cells(count, 8).
If you want I will resubmit my request with the header criteria as I know it was my fault for giving you clear information.
Thanks
Peter
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.

Join & Write a Comment

Featured Post

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now