#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Colors for entries

Hi All,
I'm working wiht Excel 2003 and trying to set up a form. I will allow
entries to be selected from a list - so far no problem. Is it possible to
format the entries in advance, i.e. that for example, if you selcet "name"
from the list, it will appear in red?
Thanks for your help
--
Ille
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Colors for entries

Conditional formating will allow you to select a difffeent color for up to 3
different items. If your listt is greater than 3 you require a macro.

"Ille" wrote:

Hi All,
I'm working wiht Excel 2003 and trying to set up a form. I will allow
entries to be selected from a list - so far no problem. Is it possible to
format the entries in advance, i.e. that for example, if you selcet "name"
from the list, it will appear in red?
Thanks for your help
--
Ille

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Colors for entries

Unfortunately my list is longer ... no idea how to use a macro. Anyway
thanks a lot.
--
Ille


"Joel" wrote:

Conditional formating will allow you to select a difffeent color for up to 3
different items. If your listt is greater than 3 you require a macro.

"Ille" wrote:

Hi All,
I'm working wiht Excel 2003 and trying to set up a form. I will allow
entries to be selected from a list - so far no problem. Is it possible to
format the entries in advance, i.e. that for example, if you selcet "name"
from the list, it will appear in red?
Thanks for your help
--
Ille

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Colors for entries

Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Num As Long
Dim rng As Range
Dim vRngInput As Variant
Set vRngInput = Intersect(Target, Range("D1,E1,F1,G1"))
If vRngInput Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
For Each rng In vRngInput
'Determine the color
Select Case rng.Value
Case Is = "Able": Num = 10 'green
Case Is = "Baker": Num = 1 'black
Case Is = "Charie": Num = 5 'blue
Case Is = "Doofus": Num = 7 'magenta
Case Is = "Edgar": Num = 46 'orange
Case Is = "Francis": Num = 3 'red
End Select
'Apply the color
rng.Interior.ColorIndex = Num
Next rng
endit:
Application.EnableEvents = True
End Sub

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

Copy/paste the code into that sheet module.

Adjust range, names and colors to suit.


Gord Dibben MS Excel MVP

On Thu, 27 Mar 2008 09:59:01 -0700, Ille wrote:

Unfortunately my list is longer ... no idea how to use a macro. Anyway
thanks a lot.


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
Combine Multiple Entries with differing amounts of entries Katie Excel Worksheet Functions 2 November 28th 07 09:53 PM
2007 Colors - I want 2003 Colors Austin22 Excel Discussion (Misc queries) 0 October 16th 07 02:49 PM
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM
Can't format font colors or cell fill-in colors canoeron Excel Discussion (Misc queries) 3 August 22nd 05 11:46 PM
How do I change multi-line entries to single line entries in Exce. CPOWEREQUIP Excel Worksheet Functions 3 April 14th 05 12:38 AM


All times are GMT +1. The time now is 01:02 PM.

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

About Us

"It's about Microsoft Excel"