Ads 468x60px

Friday, September 21, 2012

Customize Zebra lines Quickly using Table Styles [tip]

Customize Zebra lines Quickly using Table Styles [tip]:
Zebra lines, highlighting applied to alternative rows is a very good way to make tables readable & pretty.
We can use either conditional formatting or table formats to quickly add zebra lines to our data.
But what if you want a little more?
What if you want to highlight, lets say 3 rows in one color and 3 in another and repeat this …
Custom Zebra lines using Excel table formats - how to?
Of course, we can use conditional formatting and come-up with some clever mix of ROW & MOD. But why waste so much of creative sauce on something as trivial as zebra line? So here is a quick alternative.
Use Table styles and tell excel how you want to highlight the lines.

Steps to create custom zebra lines

  1. First convert your data to table, if you have not already done it.
  2. Now, go to Table Design ribbon and right click on the table style you want and choose duplicateCreate a duplicate table style by right clicking on the style you want
  3. Excel creates a duplicate table style and opens a box to edit it.
  4. Give it a friendly name like myTableStyle1 or zebra-v1
  5. Select “First Row Stripe” and set stripe size to 2 or 3 as you want.
  6. Repeat the step for “Second Row Stripe” as well.Customizing table style - set stripe sizes
  7. Click OK & save your style.
  8. And now, apply this style to your table by selecting it from Table styles gallery.
  9. Your custom zebra is ready to bray and jump around.

Bonus tip #1: You can have 2 different stripe sizes too

For example you can have 5 rows for first stripe and  2 for second stripe, thus highlighting weekends in a different color.

Bonus tip #2: You can apply the same to columns too

You can apply the same concept to column stripes (banded columns) and set their sizes using table styles.

Bonus tip #3: Turn on / off zebra lines with a click

If you ever feel tired looking at all the stripes, you can quickly turn them off /on from Design Ribbon > Banded Rows
Turn on - off zebra lines / banded rows using table settings in Excel

Homework: Change color when value changes

When you have few values with some duplicates, it makes sense to apply a band color whenever there is a change in value. How to set up zebra lines then? See here for your homework.
[Related: Zebras & Checker boards using Excel]

Do you use custom table styles?

Custom table styles are an easy way to tell Excel how we want our data to look. I use them often when designing a report or spreadsheet model.
What about you? Do you use custom styles? Have you tried the stripe size feature? What is your experience like? Please share using comments.

0 comments:

Post a Comment