Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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
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
ColorIndex skat Excel Worksheet Functions 5 June 5th 06 02:42 AM
ColorIndex Trevor Davidson Excel Programming 5 April 26th 04 10:39 PM
ColorIndex K Bro Excel Programming 2 February 7th 04 04:42 PM
ColorIndex K Bro Excel Programming 0 February 7th 04 03:30 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"