Solved

vba Conditional Formatting if cell value < 19.5 or >20

Posted on 2011-09-08
4
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

617 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