Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default VLOOKUP in a conditional format

VLOOKUP a number and fill a cell with a color that equals the number. i
require more than three colors so i can't use the 'ADD CONDITION' in
conditional formating
eg 1= red
2= green

if 1 is entered in a cell, then fill that cell in red
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default VLOOKUP in a conditional format

Hi Russell,

I have a worksheet that has a drop down list of Red, Green, Blue, and if you
pick the color from the list it turns the cell that color. It can be can
modified to return any color to the any cell of choice after the selection.

HTH
Regards,
Howard

"Russell Brown" <Russell wrote in message
...
VLOOKUP a number and fill a cell with a color that equals the number. i
require more than three colors so i can't use the 'ADD CONDITION' in
conditional formating
eg 1= red
2= green

if 1 is entered in a cell, then fill that cell in red



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default VLOOKUP in a conditional format

Thanks L.Howard Kittle,
That's not quite what i'm looking for. I have a legend (key) to rate my
product by numbers 1~6
1 = red, 2= green etc. if i put a '1' as a rating I want the cell to lookup
'1' and return it's corresponding color and fill that cell.

"L. Howard Kittle" wrote:

Hi Russell,

I have a worksheet that has a drop down list of Red, Green, Blue, and if you
pick the color from the list it turns the cell that color. It can be can
modified to return any color to the any cell of choice after the selection.

HTH
Regards,
Howard

"Russell Brown" <Russell wrote in message
...
VLOOKUP a number and fill a cell with a color that equals the number. i
require more than three colors so i can't use the 'ADD CONDITION' in
conditional formating
eg 1= red
2= green

if 1 is entered in a cell, then fill that cell in red




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default VLOOKUP in a conditional format

Hi Russell,

I believe this will do what you are asking. Where the 1 to 6 dropdown is in
F1. Change the Target.Column and Target.Row to suit. Change the color
index to suit/match your 1 - 6 colors.

If you want to still see the number that was selected delete these lines
below.
Target.Font.ColorIndex = 3


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 6 Then Exit Sub
If Target.Row < 1 Then Exit Sub
Target.Interior.ColorIndex = xlNone

If Range("F1").Value = 1 Then
With Target.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
Target.Font.ColorIndex = 3

ElseIf Range("F1").Value = 2 Then
With Target.Interior
.ColorIndex = 41
.Pattern = xlSolid
End With
Target.Font.ColorIndex = 41

ElseIf Range("F1").Value = 3 Then
With Target.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
Target.Font.ColorIndex = 4

ElseIf Range("F1").Value = 4 Then
With Target.Interior
.ColorIndex = 46
.Pattern = xlSolid
End With
Target.Font.ColorIndex = 46

ElseIf Range("F1").Value = 5 Then
With Target.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Target.Font.ColorIndex = 6

ElseIf Range("F1").Value = 6 Then
With Target.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
Target.Font.ColorIndex = 38

End If
End Sub

HTH
Regards,
Howard

"Russell Brown" <Russell wrote in message
...
VLOOKUP a number and fill a cell with a color that equals the number. i
require more than three colors so i can't use the 'ADD CONDITION' in
conditional formating
eg 1= red
2= green

if 1 is entered in a cell, then fill that cell in red



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
Format into VLookup Chuck Excel Worksheet Functions 3 August 5th 05 02:26 PM
format cell based on results of vlookup function Edith F Excel Worksheet Functions 1 July 21st 05 07:39 PM
Conditional format problem PJ Excel Discussion (Misc queries) 2 March 11th 05 02:05 PM
how to format numbers stored as text or vice versa to use vlookup teneagle Excel Worksheet Functions 1 February 3rd 05 10:41 PM
Copying a conditional format Meaux Excel Worksheet Functions 2 November 29th 04 10:19 AM


All times are GMT +1. The time now is 03:43 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"