Changing cell colours based on a cell value

G

Guest

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.
 
G

Guest

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'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top