View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Conditional formatting works, is there a better way?

Why use a macro (that is not automatic, you have to select it to run it)
when built-in functions like conditional formatting are available (and very
easy to apply in this case)?

Biff

"James E Middleton" wrote in message
...
Thanks, I'll give it a try today and post my results, hopefully, my
success!



While I'm here... I'll ask you this: Is there a way to add code to that to
make the cells with the number 10 highlighted in a different color, or
should I stick to Conditional Formatting for that?


"Jim Cone" wrote in message
...
Select the cells you don't want to print.
(multiple selections will work)
Run the code shown below.
Print
Run the macro again.
Better?
'-----
Sub HideTheBadNews()
If Selection.NumberFormat = "General" Then
Selection.NumberFormat = ";;;"
Else
Selection.NumberFormat = "General"
End If
End Sub
'----------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"James E Middleton"

wrote in message
Using Excel to track students' grades on weekly quizzes, scored 1-10.
Each
week, the results are posted. According to policy, we are allowed to post
scores of 9 or 10. We print the entire student list with the grades but
before doing so, using Conditional Formatting we format 'cell value is
less
than or equal to 8' change the font to white, and all the scores
disappear.

Is there a macro I could use for the target cell so that when printing,
the
low scores would not print without using Conditional Formatting?

Thanks!