rajkumar
12-01-2009, 11:28 AM
Hi VBAXians,
i need help in modifying a custom function.
here i have
Function RTTAIL(Group As Range, RT As Range) As String
If IsEmpty(RT) Then RTTAIL = "Blank data": Exit Function
Select Case Group.Value
Case "SFIDA", "MALTA", "DP180F": Limit = 2
Case "DC12", "FUJHIN", "OLYMPIA", "XES PSG": Limit = 4
Case Else: RTTAIL = Empty: Exit Function
End Select
If RT.Value > Limit Then RTTAIL = "Tail" Else RTTAIL = "Not a Tail"
End Function
i am calculating response time for each group based on limits assigned to them. Now my requirement is, i need to get result as RT not Met if the RT.value is greater than Limit but less than 1.5 times of Limit. And should get RT Tail if RT.value is greater than 1.5 times of Limit.
example : if my RT.value is 2.5 then it is greater than Limit but less than 1.5 times of Limit ( Limit x 1.5 times = 2 x 1.5 = 3 ) so i should get RT Not Met. this logic goes for each case in select case.
not knowing how to modify the function :doh: please help : pray2:
raj
i need help in modifying a custom function.
here i have
Function RTTAIL(Group As Range, RT As Range) As String
If IsEmpty(RT) Then RTTAIL = "Blank data": Exit Function
Select Case Group.Value
Case "SFIDA", "MALTA", "DP180F": Limit = 2
Case "DC12", "FUJHIN", "OLYMPIA", "XES PSG": Limit = 4
Case Else: RTTAIL = Empty: Exit Function
End Select
If RT.Value > Limit Then RTTAIL = "Tail" Else RTTAIL = "Not a Tail"
End Function
i am calculating response time for each group based on limits assigned to them. Now my requirement is, i need to get result as RT not Met if the RT.value is greater than Limit but less than 1.5 times of Limit. And should get RT Tail if RT.value is greater than 1.5 times of Limit.
example : if my RT.value is 2.5 then it is greater than Limit but less than 1.5 times of Limit ( Limit x 1.5 times = 2 x 1.5 = 3 ) so i should get RT Not Met. this logic goes for each case in select case.
not knowing how to modify the function :doh: please help : pray2:
raj