+ Reply to Thread
Results 1 to 6 of 6

Macro or Conditional Formatting?

  1. #1
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Macro or Conditional Formatting?

    I have a workbook with data in cells E3:E23 and I would like the data on those cells to change to red if the value of E8=Inactive

    Is it best to do this in VBA or is it possible with conditional formatting? I've some formatting where just the data on E8 changes, but I can not make it so all the cells turn red also!

    Any ideas please?

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro or Conditional Formatting?

    Select E3:E23 and use this conditional formatting formula

    =$E$8="Inactive"
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Macro or Conditional Formatting?

    Use conditional formatting.

    Highlight the cells E3:E23 then go to conditional formatting and add a rule using "Format using a formula" with this formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and set the format to red as desired.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Macro or Conditional Formatting?

    Deleted cause Jeff already posted an answer.

    Edit: and AlphaFrog too.
    Really need to start using F5 before posting.
    Last edited by bakerman2; 06-23-2018 at 07:09 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro or Conditional Formatting?

    If the value of E8 is being entered then this will work:

    Please Login or Register  to view this content.
    In the sheet module
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  6. #6
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Macro or Conditional Formatting?

    Great...! thanks guys

+ 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. Macro to set up conditional message based on results of conditional formatting
    By paysola in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2016, 12:38 AM
  2. help with conditional formatting macro
    By MATT.B in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-17-2016, 06:17 PM
  3. Conditional Formatting with Macro
    By adrianmoral in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2012, 02:20 PM
  4. Macro for formatting fonts and cell colours - not Conditional Formatting
    By Kayaness in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-07-2011, 03:46 AM
  5. need macro for conditional formatting
    By geo741 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2011, 06:45 PM
  6. Macro for conditional formatting
    By jbyrne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2010, 09:07 AM
  7. Macro/Conditional Formatting help
    By denise6372 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2009, 06:06 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