Log in to your account
Sign up

How to heatmap data with conditional formatting colour scales (row by row)

Heat mapping on excel

If you have ever worked with the advanced conditional formatting you'll know it can be a bit of a challenge, especially if you in a rush and all you want to is finish your excelling so you can actually analyse your data! In the data-driven world of analytics, we work with boatloads of data each day and sometimes analysing these trends in quick and obvious ways can be less tedious than you think.

One of my favourite tricks is applying a heat map to a range of data by row so you can analyse when each variable performs at its best - like this:conditional formatting colour scales

This can easily be done using the conditional formatting colour-scales feature for a single row. The problem comes in when your data set is hundreds of variables long and applying this method to all of them will take you a better part of the day (hours of your life which you will never get back!) which can be used more constructively! The good news is that as always, I have a trick up my sleeve! Here are two much more efficient ways to apply colour scales to your data to each row independently.

  1. Copy and Paste
  2. Yes, the answer is as simple as copy and paste. The easiest way to achieve this is to:

    • First format the first row using the colour scales gradient you prefer, I usually choose the Green - Yellow - Red gradient.
    • Highlight the first row and copy
    • Highlight the second row and past special, values only.
    • Now copy both rows and paste special to rows 3 and 4.
    • Now copy 4 and paste 4, and continue like this until all cells have been covered.

    While this is the easiest way, it's still not the fastest way if you working with a large dataset.

  3. Using Macros
  4. The good news is if you familiar with macros there is an easier way. The macro below will copy the conditional formatting you applied to the first row of data and apply it to each row you select (independently).

    Just REPLACE B1: M1 and reference the first row of your table.

      Sub nicheCF()
      For Each r In Selection.Rows
      r.PasteSpecial (xlPasteFormats)
      Next r
      Application.CutCopyMode = False
      End Sub

    How to use:

    • Apply the formatting to the first row.
    • Highlight all the unformatted rows (only the cells you want to format)
    • Run the macro
    • Sit back and enjoy your coffee while the magic happens!

    The bulk formatting usually goes quite fast, but the time it takes is directly dependant on the size of the dataset.

That's it! You're done!

Contact us

If you have any questions or would like to know more about conditional formatting, comment below or feel free to contact us here!

Tags: conditional formatting, Data Analysis, excel, How to

Previous: {{ previousBlog.sTitle }}

Posted {{ previousBlog.dtDatePosting }}

Next: {{ nextBlog.sTitle }}

Posted {{ nextBlog.dtDatePosting }}

You might also like

Most Popular WhatsApp Scams in South Africa

South Africas Most Popular WhatsApp Scams

16 November 2023

Posted by Che Kohler in Alarming

We look at why scams have become so popular on WhatsApp in South Africa and what are the top tricks used by scammers to try and sucker funds out of y...

Read more
Tips for emergency plumping

5 Tips For Emergency Plumbing Situations

24 November 2023

Posted by Brigitte Evans in Constructive Criticism

As a home owner or tenant you need to prepared for plumbing issues and break downs or it can cause even more damage so make sure you follow these tip...

Read more

Leave us a comment


{{comment.iDayLastEdit}} day ago

{{comment.iDayLastEdit}} days ago


Sign up for our newsletter