Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColorIndex & macros
Hi, I'm looking to run a macro that references another Sheet. If the Name, say, DAN shows up in cell C8 and the CELL color = 41 then activesheet.range(a1) colorindex = 41 if the name DAN shows up in cell C8 and the CELL color = 6 then activesheet.range(a1) colorindex = 6 and so on and so on. But I'll be damned if I cant figure it out. I'm working on it as side project for my boss... If anyone can help me out, that'd b great. -jlarkin -- jlarki ----------------------------------------------------------------------- jlarkin's Profile: http://www.excelforum.com/member.php...nfo&userid=865 View this thread: http://www.excelforum.com/showthread.php?threadid=27244 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColorIndex & macros
hi,
Try something like this: If sheets("sheet2").range("c8").value = "DAN" and _ Sheets("sheet2").range("C8").interior.colorindex _ = 41 then Activesheet.range("A1").interior.coloridex = 41 end if Regards Frank -----Original Message----- Hi, I'm looking to run a macro that references another Sheet. If the Name, say, DAN shows up in cell C8 and the CELL color = 41 then activesheet.range(a1) colorindex = 41 if the name DAN shows up in cell C8 and the CELL color = 6 then activesheet.range(a1) colorindex = 6 and so on and so on. But I'll be damned if I cant figure it out. I'm working on it as a side project for my boss... If anyone can help me out, that'd be great. -jlarkin. -- jlarkin ---------------------------------------------------------- -------------- jlarkin's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=8652 View this thread: http://www.excelforum.com/showthread...hreadid=272447 . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColorIndex & macros
This should work for you (change "C8", "DAN", and "A1" as needed): If,
after changing the color, they went back and changed C8 to something other than "DAN" you could have it reset its color to default if you wanted, but I didn't include this - let me know if you wanted this functionality also. hth Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(False, False) = "C8" Then If Target.Value = "DAN" Then ActiveSheet.Range("A1").Interior.ColorIndex = ActiveSheet.Range("c8").Interior.ColorIndex End If End If End Sub "jlarkin" wrote in message ... Hi, I'm looking to run a macro that references another Sheet. If the Name, say, DAN shows up in cell C8 and the CELL color = 41 then activesheet.range(a1) colorindex = 41 if the name DAN shows up in cell C8 and the CELL color = 6 then activesheet.range(a1) colorindex = 6 and so on and so on. But I'll be damned if I cant figure it out. I'm working on it as a side project for my boss... If anyone can help me out, that'd be great. -jlarkin. -- jlarkin ------------------------------------------------------------------------ jlarkin's Profile: http://www.excelforum.com/member.php...fo&userid=8652 View this thread: http://www.excelforum.com/showthread...hreadid=272447 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColorIndex & macros
Hi
see your post in Excel.misc -- Regards Frank Kabel Frankfurt, Germany "jlarkin" schrieb im Newsbeitrag ... Hi, I'm looking to run a macro that references another Sheet. If the Name, say, DAN shows up in cell C8 and the CELL color = 41 then activesheet.range(a1) colorindex = 41 if the name DAN shows up in cell C8 and the CELL color = 6 then activesheet.range(a1) colorindex = 6 and so on and so on. But I'll be damned if I cant figure it out. I'm working on it as a side project for my boss... If anyone can help me out, that'd be great. -jlarkin. -- jlarkin --------------------------------------------------------------------- --- jlarkin's Profile: http://www.excelforum.com/member.php...fo&userid=8652 View this thread: http://www.excelforum.com/showthread...hreadid=272447 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ColorIndex | Excel Worksheet Functions | |||
ColorIndex | Excel Programming | |||
ColorIndex | Excel Programming | |||
ColorIndex | Excel Programming |