Improve Table Visualization using OFFSET and Conditional Formatting

With our knowledge of the OFFSET function, here’s a tip on how to use that function combined with Conditional Formatting to make a table more legible by decluttering.

This tip can be applied on a table where the items of the main field are layed out on multiple lines, just like in the next picture.

Table before Conditional Format

Table before Conditional Format

It is possible to improve the readability of that table with formatting by separating the group of rows for each account with a border and by changing consecutive identical items to light gray.

Table after Conditional Format

Table after Conditional Format

Here are the rules that were applied to achieve this.

Rule Description A1 Formula (from row 2) R1C1 Formula
#1 Add bottom border =$A2<>OFFSET($A2,1,0) =RC1<>OFFSET(RC1,1,0)
#2 Change font to pale gray =$A2=OFFSET($A2,-1,0) =RC1=OFFSET(RC1,-1,0)

A few notes

  • Rule #1 is applied to all cells in the table, whereas rule #2 is only for column A.
  • This setup is valid for Excel 2007 or later. To adapt it for previous versions, in column A, you need to add a rule that combines rule #1 and rule #2 and apply borders and pale gray fonts. This is due to the fact that only one Conditional Formatting rule could be applied in older Excel versions (download the accompanying workbook for more details).
  • I’ve put both the A1 and R1C1 formula in the table. I sometime find it easier to work in R1C1 while doing Conditional Formatting, the main reason being that I don’t have to bother with what is the active cell while editing the formula.
  • I could have used a simpler formula without the OFFSET function like =$A2=$A3 instead. However, I prefer the OFFSET version since it is robust to row insertion.

You can download the accompanying workbook to see the table in action and with additional comments.

If you want to learn more about R1C1 reference style, I encourage you to read this post.

Bookmark and Share
This entry was posted in Tips and tagged , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Trackback

  1. By How to Model Depreciation | The Financial Modeler on November 11, 2009 at 4:37 pm

    [...] The Financial Modeler Leverage the power of Excel Skip to content HomeAboutContact « Improve Table Visualization using OFFSET and Conditional Formatting [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Email updates

    Enter your email address:

  • Share this blog

    Bookmark and Share

  • Recent Posts

  • Recent Comments

  • Meta

  • RSS The Financial Modeler

SEO Powered by Platinum SEO from Techblissonline