+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting VBA Help

  1. #1
    Registered User
    Join Date
    04-28-2016
    Location
    USA
    MS-Off Ver
    office 365
    Posts
    26

    Conditional Formatting VBA Help

    CROSS POST FROM MR.EXCEL.COM https://www.mrexcel.com/forum/excel-...ml#post5153008

    hello all,

    I am trying to make a conditional formatting VBA code that will allow me to apply the same conditional formatting but with different values for every column. I am doing this so I can set it to repeat a number of times as determined by user input. For example I make 9 new columns and I want this same formatting for the value in the same row but new column. my main issue is making work Formula1:= activecell.offset(0,x), but I do not know how to do it.

    Thanks in advance,

    Eric

    Please Login or Register  to view this content.
    Last edited by ehizzlefosho; 10-02-2018 at 10:46 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Conditional Formatting VBA Help

    What are the formulas for the conditions you want to apply?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-28-2016
    Location
    USA
    MS-Off Ver
    office 365
    Posts
    26

    Re: Conditional Formatting VBA Help

    I mainly would like to get Formula1:= activecell.offset(0,x) to work

  4. #4
    Registered User
    Join Date
    04-28-2016
    Location
    USA
    MS-Off Ver
    office 365
    Posts
    26

    Re: Conditional Formatting VBA Help

    There are three conditional formatting rules I am using , a less than x, and greater than x, and between, x and y.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Conditional Formatting VBA Help

    Are x and y fixed values or are they values in cells?

    If you apply the conditional formatting manually what option would you use?

    By the way, it's not really clear what you mean by using activecell.offset(0,x).

    On its own activecell.offset(0,x) will return the value from the referenced cell, is that what you want?

  6. #6
    Registered User
    Join Date
    04-28-2016
    Location
    USA
    MS-Off Ver
    office 365
    Posts
    26

    Re: Conditional Formatting VBA Help

    they are dynamic values. say that my active cell is Range("B9").Select , I would like the formula to equal hypothetically B3. I would like to offset this value because this code is meant to repeat a certain amount of times and offset the column by 1 every time it is repeated.

  7. #7
    Registered User
    Join Date
    04-28-2016
    Location
    USA
    MS-Off Ver
    office 365
    Posts
    26

    Re: Conditional Formatting VBA Help

    Quote Originally Posted by ehizzlefosho View Post
    they are dynamic values. say that my active cell is Range("B9").Select , I would like the formula to equal hypothetically B3. I would like to offset this value because this code is meant to repeat a certain amount of times and offset the column by 1 every time it is repeated.
    To clarify, if this code starts at b9, and a conditional formatting rule reference b4. A macro will repeat twice and the first time around the code starts at c9 and should reference c4, and a second time starts at d9 and references d4, and so forth and so forth however many times I would like to repeat the process.

  8. #8
    Registered User
    Join Date
    04-28-2016
    Location
    USA
    MS-Off Ver
    office 365
    Posts
    26

    Re: Conditional Formatting VBA Help

    Issue still unresolved *bump*

  9. #9
    Registered User
    Join Date
    04-28-2016
    Location
    USA
    MS-Off Ver
    office 365
    Posts
    26

    Re: Conditional Formatting VBA Help

    Issue still unresolved *bump*

+ 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] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  2. Replies: 1
    Last Post: 12-08-2016, 03:14 PM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 PM

Tags for this Thread

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