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!
quot;James E Middletonquot; gt; wrote in message
...
gt; Using Excel to track students' grades on weekly quizzes, scored 1-10. Each
gt; week, the results are posted. According to policy, we are allowed to post
gt; only scores of 9 or 10. We print the entire student list with the grades
gt; but before doing so, using Conditional Formatting we format 'cell value is
gt; less than or equal to 8' change the font to white, and all the low scores
gt; disappear.
gt;
gt; Is there a macro I could use for the target cell so that when printing,
gt; the low scores would not print without using Conditional Formatting?
gt;
gt; Thanks!
gt;
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 = quot;Generalquot; Then
Selection.NumberFormat = quot;;;;quot;
Else
Selection.NumberFormat = quot;Generalquot;
End If
End Sub
'----------
Jim Cone
San Francisco, USA
www.realezsites.com/bus/primitivesoftwarequot;James E Middletonquot;
gt;
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!
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?quot;Jim Conequot; gt; wrote in message
...
gt; Select the cells you don't want to print.
gt; (multiple selections will work)
gt; Run the code shown below.
gt; Print
gt; Run the macro again.
gt; Better?
gt; '-----
gt; Sub HideTheBadNews()
gt; If Selection.NumberFormat = quot;Generalquot; Then
gt; Selection.NumberFormat = quot;;;;quot;
gt; Else
gt; Selection.NumberFormat = quot;Generalquot;
gt; End If
gt; End Sub
gt; '----------
gt; Jim Cone
gt; San Francisco, USA
gt; www.realezsites.com/bus/primitivesoftware
gt;
gt;
gt; quot;James E Middletonquot;
gt; gt;
gt; wrote in message
gt; Using Excel to track students' grades on weekly quizzes, scored 1-10. Each
gt; week, the results are posted. According to policy, we are allowed to post
gt; scores of 9 or 10. We print the entire student list with the grades but
gt; before doing so, using Conditional Formatting we format 'cell value is
gt; less
gt; than or equal to 8' change the font to white, and all the scores
gt; disappear.
gt;
gt; Is there a macro I could use for the target cell so that when printing,
gt; the
gt; low scores would not print without using Conditional Formatting?
gt;
gt; Thanks!
gt;
gt;
Wouldn't another simple way to do this be to have a column (C) that holds the
actual grades and then a quot;printquot; column (D) with a formula like,
quot;=IF(C2lt;9,quot;quot;,C2)quot;, then you jus hide the grades column before printing?
quot;James E Middletonquot; wrote:
gt; Using Excel to track students' grades on weekly quizzes, scored 1-10. Each
gt; week, the results are posted. According to policy, we are allowed to post
gt; scores of 9 or 10. We print the entire student list with the grades but
gt; before doing so, using Conditional Formatting we format 'cell value is less
gt; than or equal to 8' change the font to white, and all the scores disappear.
gt;
gt; Is there a macro I could use for the target cell so that when printing, the
gt; low scores would not print without using Conditional Formatting?
gt;
gt; Thanks!
gt;
gt;
gt;
Since you are selecting the cells you don't want to print,
it would be difficult to affect cells outside of the selection.
Why don't you just conditionally format the cells to color
all grades of 10. Don't use any other cf conditions on those cells.
Then just select grades of 8 or less and run the macro I submitted.
Note: the macro code assumes the grades are number formatted
as quot;Generalquot;.
--
Jim Cone
San Francisco, USA
www.officeletter.com/blink/specialsort.htmlquot;James E Middletonquot; gt;
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?quot;Jim Conequot; gt;
wrote in message
gt; Select the cells you don't want to print.
gt; (multiple selections will work)
gt; Run the code shown below.
gt; Print
gt; Run the macro again.
gt; Better?
gt; '-----
gt; Sub HideTheBadNews()
gt; If Selection.NumberFormat = quot;Generalquot; Then
gt; Selection.NumberFormat = quot;;;;quot;
gt; Else
gt; Selection.NumberFormat = quot;Generalquot;
gt; End If
gt; End Sub
gt; '----------
gt; Jim Cone
gt; San Francisco, USA
gt; www.realezsites.com/bus/primitivesoftware
gt;
gt;
gt; quot;James E Middletonquot;
gt; gt;
gt; wrote in message
gt; Using Excel to track students' grades on weekly quizzes, scored 1-10. Each
gt; week, the results are posted. According to policy, we are allowed to post
gt; scores of 9 or 10. We print the entire student list with the grades but
gt; before doing so, using Conditional Formatting we format 'cell value is
gt; less than or equal to 8' change the font to white, and all the scores
gt; disappear.
gt;
gt; Is there a macro I could use for the target cell so that when printing,
gt; the low scores would not print without using Conditional Formatting?
gt; Thanks!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
quot;James E Middletonquot; gt; wrote in message
...
gt; Thanks, I'll give it a try today and post my results, hopefully, my
gt; success!
gt;
gt;
gt;
gt; While I'm here... I'll ask you this: Is there a way to add code to that to
gt; make the cells with the number 10 highlighted in a different color, or
gt; should I stick to Conditional Formatting for that?
gt;
gt;
gt; quot;Jim Conequot; gt; wrote in message
gt; ...
gt;gt; Select the cells you don't want to print.
gt;gt; (multiple selections will work)
gt;gt; Run the code shown below.
gt;gt; Print
gt;gt; Run the macro again.
gt;gt; Better?
gt;gt; '-----
gt;gt; Sub HideTheBadNews()
gt;gt; If Selection.NumberFormat = quot;Generalquot; Then
gt;gt; Selection.NumberFormat = quot;;;;quot;
gt;gt; Else
gt;gt; Selection.NumberFormat = quot;Generalquot;
gt;gt; End If
gt;gt; End Sub
gt;gt; '----------
gt;gt; Jim Cone
gt;gt; San Francisco, USA
gt;gt; www.realezsites.com/bus/primitivesoftware
gt;gt;
gt;gt;
gt;gt; quot;James E Middletonquot;
gt;gt; gt;
gt;gt; wrote in message
gt;gt; Using Excel to track students' grades on weekly quizzes, scored 1-10.
gt;gt; Each
gt;gt; week, the results are posted. According to policy, we are allowed to post
gt;gt; scores of 9 or 10. We print the entire student list with the grades but
gt;gt; before doing so, using Conditional Formatting we format 'cell value is
gt;gt; less
gt;gt; than or equal to 8' change the font to white, and all the scores
gt;gt; disappear.
gt;gt;
gt;gt; Is there a macro I could use for the target cell so that when printing,
gt;gt; the
gt;gt; low scores would not print without using Conditional Formatting?
gt;gt;
gt;gt; Thanks!
gt;gt;
gt;gt;
gt;
gt;
Here's what is did:
Two worksheets: 'Grades' amp; 'Print-out'.
Linked the cell from 'Grades' to the 'Print-out' sheet. Conditional
Formatting as described below.
Originally, I asked because we were cutting and pasting, and sometimes the
format would be lost.
Now, when we enter the grades, the 'Print-out' sheet is created
simultaneously without having to cut and paste.
Thanks for all the input!
quot;andy62quot; gt; wrote in message
...
gt; Wouldn't another simple way to do this be to have a column (C) that holds
gt; the
gt; actual grades and then a quot;printquot; column (D) with a formula like,
gt; quot;=IF(C2lt;9,quot;quot;,C2)quot;, then you jus hide the grades column before printing?
gt;
gt; quot;James E Middletonquot; wrote:
gt;
gt;gt; Using Excel to track students' grades on weekly quizzes, scored 1-10.
gt;gt; Each
gt;gt; week, the results are posted. According to policy, we are allowed to post
gt;gt; scores of 9 or 10. We print the entire student list with the grades but
gt;gt; before doing so, using Conditional Formatting we format 'cell value is
gt;gt; less
gt;gt; than or equal to 8' change the font to white, and all the scores
gt;gt; disappear.
gt;gt;
gt;gt; Is there a macro I could use for the target cell so that when printing,
gt;gt; the
gt;gt; low scores would not print without using Conditional Formatting?
gt;gt;
gt;gt; Thanks!
gt;gt;
gt;gt;
gt;gt;
- May 27 Tue 2008 20:44
Conditional formatting works, is there a better way?
close
全站熱搜
留言列表
發表留言