Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Can I automate an excel worksheet such that if ,say, "436" is written in a
certain cell it shades that row yellow, or if "437" is in that cell it shades the row blue. It would then be easy to visually tell in an excel chart which lines belonged to ,say, specific companies. |
#2
![]() |
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1" On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Select Case .Value Case 436: .EntireRow.Interior.ColorIndex = 6 Case 437: .EntireRow.Interior.ColorIndex = 5 'etc End Select End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH RP (remove nothere from the email address if mailing direct) "Fitz" wrote in message .. . Can I automate an excel worksheet such that if ,say, "436" is written in a certain cell it shades that row yellow, or if "437" is in that cell it shades the row blue. It would then be easy to visually tell in an excel chart which lines belonged to ,say, specific companies. |
#3
![]() |
|||
|
|||
![]()
In article , fitz1
@sympatico.ca says... Can I automate an excel worksheet such that if ,say, "436" is written in a certain cell it shades that row yellow, or if "437" is in that cell it shades the row blue. It would then be easy to visually tell in an excel chart which lines belonged to ,say, specific companies. In addition to a programmatic solution, you may also want to check out conditional formatting (Format | Conditional Formatting...) -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions |
#4
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try using conditional formatting under the format menu
"Fitz" wrote: Can I automate an excel worksheet such that if ,say, "436" is written in a certain cell it shades that row yellow, or if "437" is in that cell it shades the row blue. It would then be easy to visually tell in an excel chart which lines belonged to ,say, specific companies. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to have formulas and formats auto copy to new inserted rows | Excel Discussion (Misc queries) | |||
auto deleting defined rows | Excel Discussion (Misc queries) | |||
Auto Insert Rows of Data?? | Excel Discussion (Misc queries) | |||
Column Auto Width and Hidden Rows | Excel Discussion (Misc queries) | |||
Auto adjusting # rows between 2 worksheets | New Users to Excel |