+ Reply to Thread
Results 1 to 3 of 3

Cell Format With VBA

  1. #1
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Cell Format With VBA

    Hello
    I have a sheet with a named range, "tasks"
    I'm struggling with some code that if cells in the named range are changed, those cells are formatted with the following.
    Cells with an "R" fill red
    Cells with a "B" fill blue
    All others have no fill.
    This would apply to the active sheet only.
    Thanks in advance. Any help would be gratefully received.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Cell Format With VBA

    Hi,

    In the worksheet module (ie; right click on the tab name and select "view code") enter the following:

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    07-04-2011
    Location
    London England
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Cell Format With VBA

    Many Thanks Sweep. Perfect.
    I knew it could be simple, I was just too simple to see it.

+ 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. Replies: 4
    Last Post: 03-13-2015, 02:32 AM
  2. Replies: 3
    Last Post: 02-24-2015, 02:58 AM
  3. Replies: 1
    Last Post: 07-03-2014, 06:33 AM
  4. [SOLVED] Format painting formula to adjacent cell, and want the result to be in the original format
    By SF1eagles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2014, 10:49 AM
  5. [SOLVED] take a cell value of nixed format and multiply another cell of mixed format
    By AllenF in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-09-2014, 01:36 AM
  6. Replies: 1
    Last Post: 04-18-2012, 11:18 AM
  7. Replies: 1
    Last Post: 06-27-2005, 06:05 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