+ Reply to Thread
Results 1 to 6 of 6

Carrying formatting rules from left column

  1. #1
    Registered User
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    93

    Carrying formatting rules from left column

    I posed this question before but my ask is clearer now.

    I have a query with a transpose function which lays out data horizontally. Problem is, formatting rules do not carry over to side columns....therefore hoping for a VBA solution.

    My query always returns at least 1 column (Column C "Incident #1) so all formatting rules will be in this first column. First column has both basic formatting and some conditional rules. The table can expand up to 200 columns or constrict to just 1. I would like apply the formatting as per Column C to all columns to the right of C.
    Column D is not formatted.

    Example of formatting is wrap around text, specific borders, date format, centered, highlight in bold red if specific words appear in cells.......

    I would like to apply this code after a brand new data refresh.....
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Carrying formatting rules from left column

    I think this code should copy the formatting from column C to all columns D and beyond:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    93

    Re: Carrying formatting rules from left column

    That worked beautifully!

    Anyway to have a formula in C89 duplicate to columns to the right just as we did with formatting?

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Carrying formatting rules from left column

    This should copy the formula across:

    Please Login or Register  to view this content.
    WBD

  5. #5
    Registered User
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    93

    Re: Carrying formatting rules from left column

    WideBoy.....is there a way to delete the formula in D89 and beyond when the table constricts?

    Your VBA code works beautifully so after refresh, additional columns are added to the right of column C. Formula and formatting rules from C89 also carry over to the right. However if there are less columns than before after refresh, a reference error remains in row 89.

    How to I prevent this?

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Carrying formatting rules from left column

    Just back from vacation. Try just clearing out column D and onwards first?

    Please Login or Register  to view this content.
    WBD

+ 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. Set of Conditional Formatting rules for whole column
    By eugz in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-02-2022, 03:03 PM
  2. Replies: 11
    Last Post: 07-20-2017, 11:26 AM
  3. [SOLVED] Conditional Formatting: Comparing cell with a column of values and applying 3 rules
    By ab231 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2013, 10:30 AM
  4. Carrying Formatting Over
    By mwierenga in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-03-2012, 05:00 PM
  5. Carrying formatting automatically to new W/S
    By Jonah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. Carrying formatting automatically to new W/S
    By Jonah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  7. [SOLVED] Carrying formatting automatically to new W/S
    By Jonah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 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