![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 7
|
AS a teacher I use Excell for grading.
I am looking for a way to have the computer automaticly fill a grid a certain color when the value of "0" has been entered. I do this manually but at times I miss some and it looks very unprofessional. Any help? |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,027
|
Hey,
I think just Conditional Formatting will get you where you need to go (its under the format menu). Adam |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,064
|
Hi this will allow VBA scripts to colour A and B columns if JackInThe_UK is anywhaer in col b, you will need to chaneg this ti suite dont think VBA scripts will like 0 thou, suggest x or something else.
Sub Jacks_Rows_Colour() ' Written by Jack in the UK 21 May 2002 On Error GoTo JACKintheUK ' Jack set error handle Sheets("B W").Select ' Jack selets the required sheet ' Jack change as needed Range("A1:R50000").Select 'Jack select the required range Selection.Interior.ColorIndex = xlNone ' Jack removes any colours in the above range Range("A1").Select ' Jack hey i choose a cell Application.ScreenUpdating = False 'Jack removes screen updates FASTER code this way jack = 1 ' Jack sets Jack = 1 '>>>>>>>>>>>>>>>>>>>> ' Jack says Red you would like for a 0???? With Sheets("B W") 'Jack in the UK For JackInThe_UK = 1 To WorksheetFunction.CountIf(.Columns("B:B"), "JackInThe_UK") Set RJackInThe_UKFoundCell = .Columns("B:B").Find(What:="JackInThe_UK", _ After:=.Cells(jack, 2)) RJackInThe_UKFoundCell.EntireRow.Interior.ColorIndex = 4 '1= black 2= white 3= red 4=lime green 5= blue 6= yellow jack = RJackInThe_UKFoundCell.Row Next JackInThe_UK End With Columns("C:IV").Select Selection.Interior.ColorIndex = xlNne ' Jack rips the colour from the right (removes it) ' set as required ' (Dont really need (left in case) dirty who cares? Application.Goto Reference:="R1C1" 'Jack returns to a cell in this case A1 '(can be any i guess) Application.ScreenUpdating = True ' Jack sets updates to live JACKintheUK: ' Jack complete error handle End Sub Marker conditional format VBA _________________ If you can help a guy in trouble - If you can sort that nagging problem - Pease try, at home, at work or on a message board. Others help you! So PLEASE help if you can - If only the once. Thank you - Rdgs ====== [ This Message was edited by: Jack in the UK on 2002-05-20 15:29 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|