Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Can a dropdown list option add color/time to a range?

I am trying to build a truck dispatching spreadsheet. If I have a dropdown
list of timed truck runs, is it possible, after selecting one, to have it
color a range across columns that represent the amount of time blocked for
that particular load?
For example, if one option was "Load from Atlanta to Charleston (6hrs)", is
there a way to have it color a range of six cells? (Each column represents an
hour. There are 12 across from 0600 to 1800.)
How do you associate a time to a dropdown option and a color to an option?
Or, what is the best way to do this?
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Can a dropdown list option add color/time to a range?

Hi Outbacker,

Try this to maybe get you going, where the drop down is in B1 and the hours
start in column D1. If you are going to have a bunch of trucks drive time
rows colored, the "Cells.Interior.ColorIndex = xlNone" will have to be
modified because this wipes out all color on the sheet. It may be possible
to do this with conditional formatting. I will give it a go with CF but
can't do it right now.

Copy into the sheet module.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target < Range("B1") Then Exit Sub
Dim i As Integer
i = Range("B1").Value
Cells.Interior.ColorIndex = xlNone
Range("D1").Resize(1, i).Interior.ColorIndex = 6
End Sub

HTH
Regards,
Howard

"Outbacker" wrote in message
...
I am trying to build a truck dispatching spreadsheet. If I have a dropdown
list of timed truck runs, is it possible, after selecting one, to have it
color a range across columns that represent the amount of time blocked for
that particular load?
For example, if one option was "Load from Atlanta to Charleston (6hrs)",
is
there a way to have it color a range of six cells? (Each column represents
an
hour. There are 12 across from 0600 to 1800.)
How do you associate a time to a dropdown option and a color to an option?
Or, what is the best way to do this?
Thanks in advance.



Reply
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
result of selecting from the dropdown list should be a dropdown list No News Excel Worksheet Functions 0 July 5th 06 04:09 PM
result of selecting from the dropdown list should be a dropdown list No News Excel Worksheet Functions 2 July 1st 06 10:53 AM
Change color of font base on time range deathzorro Excel Discussion (Misc queries) 2 January 10th 06 07:58 AM
how do i define a range as a list when there is no list option in. Domespacio Excel Worksheet Functions 2 May 25th 05 11:36 AM
Autofil color to a row from dropdown list choices Alesia Excel Worksheet Functions 1 March 4th 05 11:57 PM


All times are GMT +1. The time now is 07:33 PM.

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"