• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Calculating the worst entry in a group of entries

Joe Pineapples

New Member
Hi - I'm part of a team that undertake a control assessment every month.

We have a large number of controls which in turn can have any number of lower level sub-controls. We rate each of the sub-controls either Complete, Green, Amber or Red.

I have a simple report that runs across the sub-controls but would like to run a higher level report that shows the status of the controls. To do this I am trying to create a formula that populates a control rating based on the worst value attached to the sub-controls. See example table below.

I would be very grateful for any suggestions

Big thanks

Joe


ControlSub-controlSub-control rating (these are entered values)Control rating (I would like to calculate these)
11.1RedRed
11.2AmberRed
11.3GreenRed
22.1GreenAmber
22.2GreenAmber
22.3AmberAmber
22.4GreenAmber
22.5GreenAmber
22.6GreenAmber
33.1CompleteGreen
33.2GreenGreen
33.3GreenGreen
33.4GreenGreen
44.1CompleteComplete
44.2CompleteComplete
 
Sorry - file now attached (I was unable to upload from my work pc due to security settings)

I have included the request in the top of the sheet, this time making ref to the cols. I'm keen to create a formula to create the values that I have manually entered in Col D

Big thanks for any help

Joe
 

Attachments

  • control assessment.xlsx
    11 KB · Views: 13
Is a helper column possible? A major difficulty arises from the fact that the ratings are text and not numbers. A helper column could provide numeric equivalents and still allow the use of MAXIFS.

The other approach is a flat out Office 365 dynamic array approach. Rather than assessing the controls in-situ the new function UNIQUE is used to provide a list of distinct controls. I then built a named range 'ratings' by using XLOOKUP to identify the sub-control rating that corresponds to the first instance of the control in the list. XLOOKUP will also return the final instance. Putting these together with the ':' (colon) range operator gives the list 'ratings'
= XLOOKUP( @Control#, Data[Control], Data[Sub-control rating], 0, 1) :
XLOOKUP( @Control#, Data[Control], Data[Sub-control rating], 0,-1)

Again the text descriptions are replaced by numbers (this time using XMATCH) but, unlike MAXIFS, the MAX function works with arrays as well as range references so the helper range is not needed.
= INDEX( List, MAX( XMATCH( Ratings, List) ) )
Without the latest version of Office 365 none of this will work and many will find it bewildering :confused:
 

Attachments

  • ControlRating.xlsx
    20.6 KB · Views: 13
Peter - many thanks for this - really appreciate it. Its exactly what I was after - just need to get my head round how and why it works and apply it to my real data.

Again, many thanks :)

Joe
 
Alternatively, array-enter one of the following formulae into cell D9:
Code:
=CHOOSE(MIN(IF($A$9:$A$23=A9,SEARCH(LEFT($C$9:$C$23,1),"RAGC"))),"Red","Amber","Green","Complete")
Code:
=INDEX({"Red","Amber","Green","Complete"},MIN(IF($A$9:$A$23=A9,SEARCH(LEFT($C$9:$C$23,1),"RAGC"))))
and copy down.
Array-entering means committing the formula to the sheet using Ctrl+Shift+Enter, not just Enter.
 
Last edited:
Wow - that is clever. If I get the logic here you are using the Choose function (not used this before) to select one of the four labels, with the array minimum calc to define the index for Choose

Think I will run with this and see how we get on.

Big thanks both Peter and p45cal - really appreciate the advice

Best

Joe
 
Back
Top