Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
FDA FDA is offline
external usenet poster
 
Posts: 3
Default Format rows

First, thanks for letting me know that it isn't impossible...This is my first
venture behind the scene's of Excel, so, like many virgins, I am nervous...

I tried the copy and paste, but didn't get too far. Perhaps more info will
help:

Column A (starting with row 3 and continueing down to row 89) will have the
Theme drop down list. The theme's include Food Protection Plan (green),
Medical Product Safety (pink), Personalized Medicine (blue), Expanding the
Horizons of Medicine (purple), Food and Drug Safety (orange) and
Strengthening FDA (yellow). Each has a color assigned to it (see parenthisis
above). I would like the user to be able to select the Theme from the drop
down list and have that row "highlighted" with the applicable color. Then,
they could go to the next row and select another theme that would be
highlighted with the new (applicable) color.

Still possible? I have the drop down created, just not sure about the
specific coding for it.



"Gord Dibben" wrote:

Not imp;ossible at all.

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1")
On Error GoTo endit
Application.EnableEvents = False
vals = Array("Item1", "Item2", "Item3", "Item4", "Item5")
nums = Array(8, 9, 6, 3, 7, 4)
icolor = 0
For i = LBound(vals) To UBound(vals)
If r.Value = vals(i) Then
icolor = nums(i)
End If
Next
If icolor 0 Then
r.EntireRow.Interior.ColorIndex = icolor
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.

Assumes A1 has the DV list dropdown.

Edit Item names and colors to suit.


Gord Dibben MS Excel MVP


On Mon, 25 Feb 2008 06:51:08 -0800, FDA wrote:

I am workin on a sheet that I would like to do the impossible.

I am creating a drop down list of topics. I would like to assign a color to
each topic and have excell highlight the row depending on the topic. Is this
truely imposible?



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I use formula and format as it is, in the next rows? Niranjan Excel Worksheet Functions 1 February 5th 08 09:57 PM
conditional format rows Excel Challenged Excel Discussion (Misc queries) 1 January 24th 06 06:41 PM
can't format rows to autofit jbf Excel Discussion (Misc queries) 2 January 21st 06 11:54 PM
How do I format Excel to add new rows automatically? sassecathy Excel Worksheet Functions 2 December 8th 05 02:15 AM
how to format pull down rows pjh Excel Worksheet Functions 1 November 8th 04 07:01 PM


All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"