Hi
I don't know if there's a way around this but I lack the math and vba skill to sort it out.
Basically, the chart in a worksheet (it's not really a chart - it just looks a bit like one) looks like this
http://www.ghost-watch.co.uk/riskmap3.htmlAs you can see - with the help of a couple of experts from here I've got a button that run a macro that checks the values of probability and impact (the multiplication of which = gross risk) and puts the corresponding risk code for that row in the correct cell in the chart. This code works a treat, and is as follows:
Sub EnterRiskD()
Dim O As Range
Dim cell As Range
Dim P As Range
Dim I As Range
Dim R As Range
Range("ResultsD").ClearCon
tents
For Each cell In Range("PTableD")
Set P = cell
Set I = cell.Offset(0, 1)
Set R = cell.Offset(0, -2)
If P.Value <> "" And I.Value <> "" Then
Set O = Range("ResultsD").Cells(1,
1).Offset(6 - I.Value, P.Value - 1)
If O.Value = "" Then
O.Value = R.Value
Else
O.Value = O.Value & "," & R.Value
End If
End If
Next cell
End Sub
The range ResultsD is all the cells that comprise the coloured chart at the top ie from C5 over to H10. The range PTableD is from E16 down - ie more cells than I'll need.
I've now been asked to actually chart the net risk intead - given that when charting say a row that's
Risk Code - 10
Probability - 6
Impact - 6
Gross Risk - 36
Net Risk - 20
My code will happily put Risk Code 10 -in cell H5, when it would need to go in E5 - which is the only cell with impact value of 6 that could hold a value of 20. The number of management controls is 16.
The relationship between Gross Risk and Net Risk is down to the number of management controls in place which arent listed here but this could be any number between 1 and 36. The number of management controls is subtracted from gross risk to produce a value for net risk.
If you understand this so far then thanks for sticking with me. Can any of you maths&vba geniuses come up with a way of charting net risk using a macro and command button? I'm completely stumped. I've awarded the maximum but would quite happily award 20,000 points if I could. Please ask anything you need to know,
Thanks
Deb :))