+ Reply to Thread
Results 1 to 6 of 6

Color color! Cell color!

  1. #1
    Registered User
    Join Date
    07-17-2006
    Posts
    54

    Color color! Cell color!

    hi

    i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that will have different color depending on user inupt)!

    There is 6 different colors(so NO i CANT USE conditionnal formating), i want something in vb, macro for excel 2002!

    So here an example : If in cell P10, the user put the letter N, the cell become red. It will also change the cell color in C10. Can you guys help me?

    Thanks in advance!

    Maxime

  2. #2
    micheldevon@gmail.com
    Guest

    Re: Color color! Cell color!

    I can't take credit for this, because I didn't write it. But this page
    should be able to help you out.

    http://www.personal-computer-tutor.c...v18/chad18.htm


    mhax wrote:
    > hi
    >
    > i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that
    > will have different color depending on user inupt)!
    >
    > There is 6 different colors(so NO i CANT USE conditionnal formating), i
    > want something in vb, macro for excel 2002!
    >
    > So here an example : If in cell P10, the user put the letter N, the
    > cell become red. It will also change the cell color in C10. Can you
    > guys help me?
    >
    > Thanks in advance!
    >
    > Maxime
    >
    >
    > --
    > mhax
    > ------------------------------------------------------------------------
    > mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450
    > View this thread: http://www.excelforum.com/showthread...hreadid=567581



  3. #3
    Gary Keramidas
    Guest

    Re: Color color! Cell color!

    maybe something david mcritchie has will help

    http://www.mvps.org/dmcritchie/excel/event.htm#case

    --


    Gary


    "mhax" <mhax.2bxeh5_1154544308.8875@excelforum-nospam.com> wrote in message
    news:mhax.2bxeh5_1154544308.8875@excelforum-nospam.com...
    >
    > hi
    >
    > i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that
    > will have different color depending on user inupt)!
    >
    > There is 6 different colors(so NO i CANT USE conditionnal formating), i
    > want something in vb, macro for excel 2002!
    >
    > So here an example : If in cell P10, the user put the letter N, the
    > cell become red. It will also change the cell color in C10. Can you
    > guys help me?
    >
    > Thanks in advance!
    >
    > Maxime
    >
    >
    > --
    > mhax
    > ------------------------------------------------------------------------
    > mhax's Profile:
    > http://www.excelforum.com/member.php...o&userid=36450
    > View this thread: http://www.excelforum.com/showthread...hreadid=567581
    >




  4. #4
    Bob Phillips
    Guest

    Re: Color color! Cell color!

    Something like

    Private Sub Worksheet_Change(ByVal Target As Range)
    Const WS_RANGE As String = "H1:H10"


    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    With Target
    Select Case .Value
    Case "N": .Interior.ColorIndex = 3 'red
    Case "X": .Interior.ColorIndex = 6 'yellow
    Case "Y": .Interior.ColorIndex = 5 'blue
    Case "G": .Interior.ColorIndex = 10 'green
    End Select
    End With
    End If


    ws_exit:
    Application.EnableEvents = True
    End Sub


    'This is worksheet event code, which means that it needs to be
    'placed in the appropriate worksheet code module, not a standard
    'code module. To do this, right-click on the sheet tab, select
    'the View Code option from the menu, and paste the code in.


    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "mhax" <mhax.2bxeh5_1154544308.8875@excelforum-nospam.com> wrote in message
    news:mhax.2bxeh5_1154544308.8875@excelforum-nospam.com...
    >
    > hi
    >
    > i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that
    > will have different color depending on user inupt)!
    >
    > There is 6 different colors(so NO i CANT USE conditionnal formating), i
    > want something in vb, macro for excel 2002!
    >
    > So here an example : If in cell P10, the user put the letter N, the
    > cell become red. It will also change the cell color in C10. Can you
    > guys help me?
    >
    > Thanks in advance!
    >
    > Maxime
    >
    >
    > --
    > mhax
    > ------------------------------------------------------------------------
    > mhax's Profile:

    http://www.excelforum.com/member.php...o&userid=36450
    > View this thread: http://www.excelforum.com/showthread...hreadid=567581
    >




  5. #5
    Jim Thomlinson
    Guest

    RE: Color color! Cell color!

    Take a look at this download from xlDynamic. It extends Conditional
    formatting from 3 to 30...

    http://www.xldynamic.com/source/xld.....Download.html
    --
    HTH...

    Jim Thomlinson


    "mhax" wrote:

    >
    > hi
    >
    > i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that
    > will have different color depending on user inupt)!
    >
    > There is 6 different colors(so NO i CANT USE conditionnal formating), i
    > want something in vb, macro for excel 2002!
    >
    > So here an example : If in cell P10, the user put the letter N, the
    > cell become red. It will also change the cell color in C10. Can you
    > guys help me?
    >
    > Thanks in advance!
    >
    > Maxime
    >
    >
    > --
    > mhax
    > ------------------------------------------------------------------------
    > mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450
    > View this thread: http://www.excelforum.com/showthread...hreadid=567581
    >
    >


  6. #6
    Registered User
    Join Date
    07-17-2006
    Posts
    54

    info

    wow ty guys for all the infos! i will try to figure that out!


    Quote Originally Posted by Jim Thomlinson
    Take a look at this download from xlDynamic. It extends Conditional
    formatting from 3 to 30...

    http://www.xldynamic.com/source/xld.....Download.html
    --
    HTH...

    Jim Thomlinson


    "mhax" wrote:

    >
    > hi
    >
    > i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that
    > will have different color depending on user inupt)!
    >
    > There is 6 different colors(so NO i CANT USE conditionnal formating), i
    > want something in vb, macro for excel 2002!
    >
    > So here an example : If in cell P10, the user put the letter N, the
    > cell become red. It will also change the cell color in C10. Can you
    > guys help me?
    >
    > Thanks in advance!
    >
    > Maxime
    >
    >
    > --
    > mhax
    > ------------------------------------------------------------------------
    > mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450
    > View this thread: http://www.excelforum.com/showthread...hreadid=567581
    >
    >

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1