+ Reply to Thread
Results 1 to 2 of 2

Coloring rows by value

  1. #1
    Registered User
    Join Date
    10-14-2010
    Location
    NL
    MS-Off Ver
    Excel 2010
    Posts
    13

    Coloring rows by value

    Hi all!

    I have a little question:

    I have dropdown boxes in column C with the values 1 - 5 which get a color assigned by a vba script.

    Is it possible to give the enire row the same color as the cell in column C?
    If so, how should I do this?

    I'm a compleet VBA-newbie and I've been playing around with it but I can't figure it out.

    Hope someone can help me. It would be hugely appreciated.

    Thanks in advanced!

    Kind regards,

    - Little_Ghost

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Coloring rows by value

    Assuming the worksheet_change event is being used to trigger the code to set the cell color, this code should be close to what you are using, except that it addresses a range of cells rather than a single cell.

    You will need to modify the numeric values for iColor for each of the Case statements to the same values in your exisiting code. You did not specify how many columns across to color the cells, so adjust "F" below to whatever is appropriate for your worksheet.

    Please Login or Register  to view this content.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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