Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Translating numbers into number with color pattern
I am trying to create attention catching number pattern but I don't wan to manually enter each color pattern formating. Is there a way where enter a number and its associated color pattern will appear on th number in another place ? For example: series number in one column 1,2,3 4 ,5,6,7,8,9,10 I enter 1, 5, 7 on separate column column 1,2,3 4 ,5,6,7,8,9,10 1, 5 & 7 's background color(pattern color) for the column will chang to yellow. How to associate a particular group of numbers with certain patter color ? Thanks.. -- Harry8 ----------------------------------------------------------------------- Harry88's Profile: http://www.excelforum.com/member.php...fo&userid=3529 View this thread: http://www.excelforum.com/showthread.php?threadid=55079 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Translating numbers into number with color pattern
Hi Harry, in the code below, I gave the main numerical list (1,2,3,4,5,...)
the range name, "DataList". I gave the highlight items list (1,5,7 in your example), the range name "HighlightList". Sub HighlightListValues() 'Highlight values in a data list that are common to a highlight values list Dim i As Integer, j As Integer Dim DataListRows As Integer, HighlightListRows As Integer 'Determine the number of items in the data list and the highlights list DataListRows = Application.WorksheetFunction.CountA(Range("DataLi st")) HighlightListRows = Application.WorksheetFunction.CountA(Range("Highli ghtList")) 'Clear any currently highlighted items in the data list Range("DataList").Interior.ColorIndex = xlNone 'Highlight items in the data list that are also in the highlights list For i = 1 To HighlightListRows For j = 1 To DataListRows If Range("DataList").Cells(j, 1).Value = Range("HighlightList").Cells(i, 1).Value Then Range("DataList").Cells(j, 1).Interior.ColorIndex = 36 End If Next j Next i End Sub "Harry88" wrote: I am trying to create attention catching number pattern but I don't want to manually enter each color pattern formating. Is there a way where I enter a number and its associated color pattern will appear on the number in another place ? For example: series number in one column 1,2,3 4 ,5,6,7,8,9,10 I enter 1, 5, 7 on separate column column 1,2,3 4 ,5,6,7,8,9,10 1, 5 & 7 's background color(pattern color) for the column will change to yellow. How to associate a particular group of numbers with certain pattern color ? Thanks... -- Harry88 ------------------------------------------------------------------------ Harry88's Profile: http://www.excelforum.com/member.php...o&userid=35297 View this thread: http://www.excelforum.com/showthread...hreadid=550797 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Translating numbers into number with color pattern
Thanks Paul Mathews for your elegant solution.. -- Harry8 ----------------------------------------------------------------------- Harry88's Profile: http://www.excelforum.com/member.php...fo&userid=3529 View this thread: http://www.excelforum.com/showthread.php?threadid=55079 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Translating a letter to a number within an array | Excel Worksheet Functions | |||
Cell pattern/color | Excel Discussion (Misc queries) | |||
Any formula to count number of cells with a specific color pattern | Excel Worksheet Functions | |||
color bar with pattern macro | Charts and Charting in Excel | |||
Translating Column Addresses into number/integer | Excel Programming |