PC Review


Reply
Thread Tools Rate Thread

Changing cell colours based on a cell value

 
 
=?Utf-8?B?Q2hyaXMgV2VsYm91cm5l?=
Guest
Posts: n/a
 
      26th Oct 2006
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 With Quote
 
 
 
 
=?Utf-8?B?Q2hyaXMgV2VsYm91cm5l?=
Guest
Posts: n/a
 
      26th Oct 2006
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Cell Background Color based on data from another cell Speedy Microsoft Excel Misc 2 16th Mar 2009 04:10 PM
Re: Changing cell text color based on cell number W. Wheeler Microsoft Excel Programming 1 23rd Apr 2007 07:24 AM
Changing Multiple Cell Colours based on Drop Down option Selected =?Utf-8?B?R3J1bXB5IEhlYWQ=?= Microsoft Excel Programming 2 15th Sep 2006 01:26 AM
Changing colours of a cell Kevin Microsoft Excel Worksheet Functions 2 23rd Sep 2004 08:05 AM
Changing cell colours The Stoat Microsoft Excel Discussion 1 29th Jun 2004 08:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:13 PM.