Conditional formatting (Colour Scales) across a range of cells

Copper Contributor

Hello, and excuse me if this is not the right place to ask this question... 

 

I have a sheet with 9 tables. Each table has 1 total. I'd like to set up a conditional format rule that highlights the total cell with the greatest and lowest value, preferably using the colour scales conditional formatting tool. However the cells sit on 3 different rows and I cannot figure out how to get then to relate to each other. Any ideas? 

5 Replies

@Gethin 

 

I'd like a little more info, if you don't mind. I'm curious, first, whether it's possible that each of these nine tables represents the same kind of data, just (for example) different bank accounts, different customers, different stores, different sales districts? Asked another way, are the nine tables all possessing the same columns with the same headings?

 

If they are, if you've just arranged them as nine tables to have more of a "side-by-side" comparison, one of the best things you could do is to convert them into a single table. Doing so would make it easy for you to answer your own question--not that some of us here wouldn't be happy to help. But you could also find more of the advantages of having your database designed for a variety of cross tabulated reports via, say, Pivot Table.

 

If not, if they're categorically different, then let us know that and we'll see where we can go from there.

@mathetes 

 

Attached is a screen shot of the tables. I need then to be set out as they are so they can be seen. Each tables total is a numeric total

@Gethin 

 

You do need an output sheet that displays the nine arrays of data. No argument.

 

But you're confusing output (this reporting side-by-side) with input, the gathering of all the raw data. You could do that from a single database, and it would give you even more flexibility.

 

I'll see if I can put something together to illustrate this. And in the meantime, maybe one of the other experts here--with working knowledge of Power Query or the like--will be able to answer your first question.

@Gethin 

 

In the attached I've assembled a very cursory example of how a single raw data base can be summarized in a pivot table to show the total counts of trips, doses (wasn't clear what you were doing with hours and minutes). I only did three people (on the assumption that each of your nine summaries represented a different service provider) and three months (enough to illustrate) rather than twelve.

 

The Pivot Table--which is what this output is--is almost automatic. No formulas need be written at all. The Pivot Table facility is designed so that it summarizes total counts (of the trips) or sums (of the total dosages in this case)....and it can do much more. It's widely regarded as one of the most useful kinds of basic outputs and it works wonders with raw data input.

 

This is not the exact layout you have, but that could be done as well. My point is simply to show how a single database can serve as the basis for a detailed analytical report. It's a lot more flexible if you separate the raw data (Input) end of things from the reporting or Output end. Excel has amazing abilities to summarize data. When we "manually" get in the way by artificially breaking it apart to early--and then want the kind of cross table analysis you're asking for--we actually make it harder to get there.

 

This happens because we often approach the spreadsheet thinking of the paper printout we want at the end, and design things according to that desired end product. Instead, it usually is helpful to think first of the data you want to summarize, just in terms of the data itself: how can it be collected, at what level of granularity, to then serve, when we have all the data, as the basis for a variety of comparative reports, trend analyses, and so forth.

@Gethin 

 

And here--I can be a nice guy too, and just answer your question--is an example of how you could create conditional formatting that highlights the Highest value (in green) and the Lowest (in red) in nine different cells across three rows.

 

I have a couple text boxes in the sheet that explain a little of the thinking. You'd have to adjust the formulas for calculating min and max to the cell references in your own sheet, but other than that it should work just fine. The heart of my way of doing it is to put two cells off to the side--call them "helper cells--finding the minimum of your nine in one of them; the max in another. And then use the value in those two cells as the determining factor in your conditional formatting rules.

 

But please do give thought to organizing your database itself differently so as to take advantage of Excel's amazing abilities to summarize that data.