View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tinä Tinä is offline
external usenet poster
 
Posts: 1
Default VBA to match Cell Colour to another Cell


Hi,

I've looked at various examples of using the VBA Interior.ColorInde
but cannot get the background colour from one Cell to be put in anothe
Cell. I hope this will explain what I'm trying to do:

I have two Columns using Dynamic Named Ranges - Column "C" is "WIP" an
Column "H" is "Cost" .
Column "C" with text and various background colours and "H" wit
numbers and no background colours. The data in both Columns starts fro
Row 8. I need the Cells in Column "H" to take on the same backgroun
colour as the corresponding Cells in Column "C" on the same Row.
cannot use either of the Columns data as criteria because the data i
so varied but I would like to make a link with the cells usin
background colour just based on the Cells being on the same Row; i.
background colour of Cell "C8" to match colour of Cell "H8".

The Columns are dynamic and the Rows will constantly increase i
length.
I would like the background colour matching to be done without me firs
having to manually select the cells on the worksheet.

Can VBA make the selections and colour change without my intervention
and as new Cells are added and coloured in Column "C" automaticall
update the corresponding Cell/Row in Column "H" with the backgroun
colour from Column "C" Cell/Row. Also can VBA do the above by usin
the Dynamic Named Ranges "WIP" and "Cost" rather than the individua
Column/Cell references?

The information for the Defined Names Refers to Box
=OFFSET('Divisions'!$C$6,2,0,COUNTA('Divisions'!$C :$C),1) This i
name "WIP"
=OFFSET('Divisions'!$H$6,2,0,COUNT('Divisions'!$H: $H),1) This i
name "Cost"

Cheers
Tin

--
Tin
-----------------------------------------------------------------------
Tinä's Profile: http://www.excelforum.com/member.php...fo&userid=1541
View this thread: http://www.excelforum.com/showthread.php?threadid=27740