+ Reply to Thread
Results 1 to 5 of 5

Shade cells by cell value

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    North Ogden, UT
    MS-Off Ver
    Excel 2003
    Posts
    8

    Shade cells by cell value

    I don't have much experience with macros and could use some help. I have a spreadsheet with columns M thru AI to be shaded gray, except the first number of cells determined by the value in column L. So if L3=3, then M3,N3, and O3 should have no formatting, and P3 thru AI3 should be gray. Thanks in advance
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,227

    Re: Shade cells by cell value

    This is best done with conditional formatting. I am using 2013 and converting to 2003 so hopefully what I've done here will work for you. You need to specify what you want when the value in column L is ALL or REF.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Shade cells by cell value

    Have you tried Conditional Formatting? If you want a VBA way to do it try this:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Shade cells by cell value

    Try this code...

    Please Login or Register  to view this content.
    Regards,
    Rudi

  5. #5
    Registered User
    Join Date
    05-06-2014
    Location
    North Ogden, UT
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Shade cells by cell value

    Thanks to all who applied. If it's all or Ref I don't need any formatting either. The other concern with this is I thought in 2003 I am limited to how many conditional format rules I can use in a cell. If not,then this is perfect. Also, other PC's have different versions of excel, and it will need to work for all versions.

+ 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. [SOLVED] Formula to use to shade a cell red if two separate conditions apply (in separarate cells)
    By Dhabitude in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-03-2013, 08:18 AM
  2. [SOLVED] Conditional formatting to shade cells if another cell returns no value
    By brharrii in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2013, 12:42 PM
  3. Replies: 3
    Last Post: 07-28-2013, 10:24 PM
  4. Replies: 2
    Last Post: 12-17-2011, 08:13 AM
  5. VBA to SHADE cells based on: step-size & starting cell
    By zusammen in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-14-2009, 10:09 AM

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