Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing cell colours based on a cell value

I hope you can help as i've run into a bit of a wall on figuring this out.

I have a Spreadsheet, where "Sheet1" values are populated from a vba
recordset based on a SQL query. For each record in the record set the values
are pasted onto the worksheet. I would like the cell colours for each row to
be filled depending on the "Title" value in the second column 'B'

The appropriate title names & colours are to be defined in 'Sheet2' where
each row will contain the title name/value, and cell fill colour.

I guess im looking for some kind of vbs function to lookup the recordset
value (ie 'Mirror') in sheet 2 and apply the interior fillindex to that row,
based on the cell colour obtained from sheet 2.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing cell colours based on a cell value

I have resolved this now. My solution was to use the Find functionality
against a range of cells for 'sheet2' offset to the next colum and retrive
the interior.colourindex for the specified cell, and apply this colorindex to
the row on 'sheet1'

"Chris Welbourne" wrote:

I hope you can help as i've run into a bit of a wall on figuring this out.

I have a Spreadsheet, where "Sheet1" values are populated from a vba
recordset based on a SQL query. For each record in the record set the values
are pasted onto the worksheet. I would like the cell colours for each row to
be filled depending on the "Title" value in the second column 'B'

The appropriate title names & colours are to be defined in 'Sheet2' where
each row will contain the title name/value, and cell fill colour.

I guess im looking for some kind of vbs function to lookup the recordset
value (ie 'Mirror') in sheet 2 and apply the interior fillindex to that row,
based on the cell colour obtained from sheet 2.

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
Changing contents of cell based on Cell Format HeatherJ Excel Worksheet Functions 3 December 22nd 09 03:06 PM
Changing Cell Background Color based on data from another cell Speedy Excel Discussion (Misc queries) 2 March 16th 09 04:10 PM
Changing a color in a cell based on the text in another cell Ryan Excel Discussion (Misc queries) 3 November 13th 08 10:17 PM
Changing Multiple Cell Colours based on Drop Down option Selected Grumpy Head Excel Programming 2 September 15th 06 01:26 AM
Format colour of cells based on other cell - 34 colours Graham Tritton Excel Programming 2 July 14th 06 03:10 AM


All times are GMT +1. The time now is 04:21 AM.

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"