+ Reply to Thread
Results 1 to 5 of 5

Changing Cell Fill Colour based on another cell value

  1. #1
    Registered User
    Join Date
    10-30-2003
    Posts
    50

    Changing Cell Fill Colour based on another cell value

    Morning All,

    I have a table:

    Ref 1 2 3 4 5 6 Stage
    11770 26-03-08 1246
    12029 18-12-07 12345
    12081 22-01-08 16
    12177 04-12-07 126
    12195 22-01-08 136

    I want to colour in the relevant cells for each ref depending on the numbers in the stage column. So for the first line, the cells in columns 1,2,4&6 need to be shaded in. For the second line, the cells in columns 1,2,3,4,&5 need to be shaded in.

    I already have a lot of conditional formatting set on the sheet so need to do this with a macro.

    I have tried to write something but am having issues with it finding the 1 and shading in the correct column but then jumping out of the loop and on to the next cell.

    Any help will be gratefully rec'd,

    Thanks in advance.

    Cheers,

    MoonWeazel
    Last edited by MoonWeazel; 10-02-2008 at 10:14 AM. Reason: Solved!!!

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419
    can you post example workbook.

    with 1 or 2 formatted records
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-30-2003
    Posts
    50

    Attached spreadsheet

    Hi There,

    I have attached a spreadsheet which hopefully will make a little more sense than my earlier try!

    Cheers,

    MoonWeazel
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419
    Try this

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-30-2003
    Posts
    50

    Excellent!!

    Cheers!!!

    That works a treat!!!

    Thanks!!

    A happy MoonWeazel!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Run a macro based on changing Cell Value
    By sepandb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2008, 03:19 PM
  2. using cell content to reference a worksheet tab name in second workbook
    By Conor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2007, 09:32 AM
  3. Changing font size in a range based on cell value
    By svaiskau in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2007, 11:39 AM
  4. autoset cell fill colour
    By andr3w266 in forum Excel General
    Replies: 4
    Last Post: 01-12-2007, 11:02 AM
  5. changing cell colour using based on cell value
    By baggy098 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-30-2006, 08:07 PM

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