LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VB Code Highlight Rows Based on Color Index

Can someone please help me with VB code for the following process:

I have a list of items in column A (a database query linked to Access
table). The items are highlighted in different colors by the end-user.
When I refresh the database query the next day, the colors move around
or dissapear because new items get added to the list.

I added a vb function and call it in a hidden column B to display the
color index of cell A.

If OfText = True Then
CellColorIndex = InRange(1, 1).Font.ColorIndex
Else
CellColorIndex = InRange(1, 1).Interior.ColorIndex
End If

So, for example, cell A2 is highlighted in yellow, thus cell B2
displays number "6".

How can I create a vb code with a loop to go through the rows and
highlight the rows based on the value in column B?

Hopefully this makes sense.

Thank you in advance!

 
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
highlight subtotal rows with a fill color Deb Raskob Excel Worksheet Functions 1 August 9th 08 06:30 PM
Color Index Code, is there any thing like that? wilchong via OfficeKB.com New Users to Excel 3 May 22nd 08 01:56 PM
Should be able to color code or highlight Excel worksheet tabs. brie_01 Excel Worksheet Functions 3 August 17th 06 03:42 PM
Range based on interior color index? garle Excel Programming 4 January 25th 06 02:24 PM
excel: How can I color code rows based on a value in a cell? Parker1333 Excel Discussion (Misc queries) 2 February 1st 05 10:37 PM


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