?
Solved

Conditional formula to format "Personal Best"

Posted on 2011-10-30
8
Medium Priority
?
269 Views
Last Modified: 2012-05-12
I'm not sure if this is possible, but I'd like to conditionally format a row based on the premise that the value is greater than any previous value.

This if for recording my kids Little Athletics results. If they beat they previous time it's a PB. At the moment I can only work out conditional formatting if it's their best time, so in effect if they beat their PB every week there will only be one highlighted cell, not a highlight every time it was a PB.

Just to clarify, in the example below for 100m times:

19.2, 18.8, 19.3, 18.7, 18.0, 18.1

The second, forth and fifth values should be highlighted. It may be necessary that the first one also is as technically it's a PB. Ideally the formula would recognise this didn't beat any other time so wouldn't highlight it. I don't mind if this is highlighted though.
0
Comment
Question by:tonydav67
  • 4
  • 4
8 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 37054409
If you have results in A2:K2 then select that range and use this formula in conditional formatting

=ISNUMBER(A2)*(B2<=MIN($A2:A2))*(B2<>"")

see attached example. I generated some random times, press F9 to re-generate

regards, barry
27422864.xls
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 37054415
Note: the above will also format cells if the time is equal to the current PB. If it must be faster then change the <= in the formula to just <, i.e.

=ISNUMBER(A2)*(B2<MIN($A2:A2))*(B2<>"")

barry
0
 
LVL 2

Author Closing Comment

by:tonydav67
ID: 37054421
That is truly awesome.

And thanks for including the spreadsheet.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 50

Expert Comment

by:barry houdini
ID: 37054435
I notice one small problem - in my example I allowed blanks for some races (did not compete?) but in case a PB comes after a blank that won't be formatted, so formula should change to this version to cater for that

=COUNT($A2:A2)*(B2<MIN($A2:A2))*(B2<>"")

regards, barry
0
 
LVL 2

Author Comment

by:tonydav67
ID: 37054445
Thanks, I'll make the change you mention as they don't do every race every week.

cheers,
tony
0
 
LVL 2

Author Comment

by:tonydav67
ID: 37055129
Hi Barry,

I've just noticed an issue with the new formula.

If there is a gap (such as event not run during a week), then after that the first time a score is beaten it will be a PB.  Eg.

19, 18*,18.5,17.9*,blank,19,18.9*

The * show what will be highlighted.

cheers,
tony
0
 
LVL 2

Author Comment

by:tonydav67
ID: 37073628
Please ignore my last comment. The formula is correct but needs two changes for field events if anyone is interested. The final formulas (as per Barry) are:

Track events:
=COUNT($A2:A2)*(B2<MIN($A2:A2))*(B2<>"")

Field events:
=COUNT($A3:A3)*(B3>MAX($A3:A3))*(B3<>"")

You need to change the row to be the correct row. Copying and pasting the format will then work for future rows.

Thanks to and all credit to Barry for his help in developing this conditional formatting formula.

tony
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 37073659
No problem tony,

Sorry, I missed your earlier comment otherwise I would have responded sooner.....

regards, barry
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question