+ Reply to Thread
Results 1 to 7 of 7

How to apply conditional formatting to a whole column

  1. #1
    Registered User
    Join Date
    10-25-2010
    Location
    Valparaiso, IN
    MS-Off Ver
    Excel 2007
    Posts
    12

    How to apply conditional formatting to a whole column

    I am trying to apply a conditional format to a group of cells that would underline or highlight if the condition is met. I can do this individually for each cell. Is there a formula that will apply to the whole group?

    Example
    =A1>B1 then C1 is highlighted
    =A2>B2 then C2 is highlighted
    =A3>B3 then C3 is highlighted

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to apply conditional formatting to a whole column

    1) Don't apply CF to an entire column unless you're sure you're going to have a million rows of data. Apply the CF to a reasonable range for your needs, typically a few 100 rows, perhaps a few 1000.

    2) Highlight the full range of cells to apply to, perhaps C1:C300

    3) Enter the CF formula as if it were for the first row, the rest should update themselves if you leave the $ symbols off of the row reference.

    =$A1>$B1
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-25-2010
    Location
    Valparaiso, IN
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: How to apply conditional formatting to a whole column

    That is what I assumed as well but it is not working for me.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to apply conditional formatting to a whole column

    That's how it works. Try it on a range of 10 cells or so them upload it so we can see what actually ended up in your sheet.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How to apply conditional formatting to a whole column

    It is generally more efficient to apply CF to an entire column than to specific ranges, especially if those ranges are large.
    Remember what the dormouse said
    Feed your head

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to apply conditional formatting to a whole column

    Quote Originally Posted by romperstomper View Post
    It is generally more efficient to apply CF to an entire column than to specific ranges, especially if those ranges are large.
    This is a debate worth having. Suffice to say I've seen application of Conditional Formatting and cell formatting applied to whole empty columns result in workbooks with massive file size and little real data.

    Thus, I rarely counsel whole column application of formatting. This doesn't seem to happen if all you apply is number formatting, but beyond that...

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How to apply conditional formatting to a whole column

    It's usually due to how and when the formatting was applied. Generally it is best to apply formatting to the largest contiguous area in one go, rather than adding it piecemeal, and to use as few different formats as possible (that's also a clarity issue as much as a workbook efficiency one).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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