ChrisDCExcel
New Member
- Joined
- Oct 29, 2015
- Messages
- 1
Hi All,
This question is in reference to a video Mr. Jelen had posted a while back regarding joining values from a list within a risk matrix. I've attached the video here --> https://www.youtube.com/watch?v=_XqCX4pKFPM
Is there any way to structure this such that the source range is dynamic (i.e. delete and add new values and have that reflected in the risk matrix).
Here's an example of the code as well...
Thanks!
This question is in reference to a video Mr. Jelen had posted a while back regarding joining values from a list within a risk matrix. I've attached the video here --> https://www.youtube.com/watch?v=_XqCX4pKFPM
Is there any way to structure this such that the source range is dynamic (i.e. delete and add new values and have that reflected in the risk matrix).
Here's an example of the code as well...
Code:
Function ProbSevScore(Prob As Integer, Sev As Integer, Nbr As Range)
Application.Volatile True
Dim cell As Range
ProbSevScore = ""
For Each cell In Nbr
PScore = Right(cell.Offset(0, 1), 1) + 0
SScore = Right(cell.Offset(0, 2), 1) + 0
If PScore = Prob Then
If SScore = Sev Then
If Len(ProbSevScore) > 0 Then ProbSevScore = ProbSevScore & Chr(10)
ProbSevScore = ProbSevScore & cell.Value
If cell.Value = "" Then cell = ""
End If
End If
Next cell
End Function
Thanks!