+ Reply to Thread
Results 1 to 7 of 7

Conditional Formatting different Excel columns without repeating code

  1. #1
    Registered User
    Join Date
    02-18-2023
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    6

    Post Conditional Formatting different Excel columns without repeating code

    Hello,

    Here is my problem; I have created a macro in Excel using the Record Macro function. The purpose of the Marco is to apply conditional formatting to about 12 separate columns of numbers. The columns need to be treated separately. The macro wants to create this code separately for each column, as shown here. I don't want this code repeated 12x. I simply want to enter all the columns (e.g. H2:H50 L2:L50 P2:P50 etc.) in the Range line and have the code below apply to all the columns listed but this code does not work for some reason.

    Any advice welcome.

    Please Login or Register  to view this content.
    Last edited by Gomarty; 02-18-2023 at 01:34 PM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Conditional Formatting different Excel columns without repeating code

    Hi
    wrapping code with code tags makes things easier for all...

  3. #3
    Registered User
    Join Date
    02-18-2023
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Conditional Formatting different Excel columns without repeating code

    Hi, I'm not a coder - what does that mean, and does it solve my problem?

  4. #4
    Registered User
    Join Date
    02-18-2023
    Location
    Pakistan
    MS-Off Ver
    2016
    Posts
    3

    Re: Conditional Formatting different Excel columns without repeating code

    edit your initial thread. you see the hashtag thing? click on it, and put the code part between the [Code] things

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Conditional Formatting different Excel columns without repeating code

    to look like this

    Please Login or Register  to view this content.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  6. #6
    Registered User
    Join Date
    02-18-2023
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Conditional Formatting different Excel columns without repeating code

    Thanks. Done. Now whats the solutions? Cheers.

  7. #7
    Registered User
    Join Date
    02-18-2023
    Location
    New Zealand
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Conditional Formatting different Excel columns without repeating code

    Thanks. Done. Now what's the solutions? Cheers.

+ 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. VBA: Applying Gradient Formatting Rules to Every Other Column on Large Dataset
    By I-Like-Excel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-13-2022, 07:23 AM
  2. Replies: 9
    Last Post: 07-13-2022, 07:23 AM
  3. Help With Repeating Conditional Formatting
    By Kirstyamanda in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-08-2016, 02:33 PM
  4. Repeating Columns - Formatting only on First Page
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2014, 06:23 PM
  5. [SOLVED] Conditional Formatting or Formula for Repeating Dates
    By long8484 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-02-2014, 02:28 PM
  6. [SOLVED] controlling the CONDITIONAL FORMATTING in a repeating table
    By InterstateRentals in forum Excel General
    Replies: 7
    Last Post: 01-17-2014, 04:29 PM
  7. Repeating VBA code across columns
    By BrentGT1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 10:38 AM

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