Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vba Conditional Formatting if cell value < 19.5 or >20

Posted on 2011-09-08
4
Medium Priority
?
210 Views
Last Modified: 2012-05-12
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
Comment
Question by:ptp2
  • 2
4 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 36502323
Does it have to be code rather than just applying conditional formatting?
0
 
LVL 10

Accepted Solution

by:
ukerandi earned 2000 total points
ID: 36502382
Enter value in H column click on Run button
answerColor.xls
0
 
LVL 1

Author Closing Comment

by:ptp2
ID: 36502475
Thanks for your quick response - another problem beaten!
0
 
LVL 1

Author Comment

by:ptp2
ID: 36509052
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

879 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