Hi,

i am trying to write a custom function for response time.

[VBA]
Function RTTAIL(Group, GroupA As Range, GroupB As Range, RT)
GroupA = Array("SFIDA", "MALTA", "DP180F")
GroupB = Array("DC12", "FUJHIN", "OLYMPIA", "XES PSG")
RTTAIL = IF(AND(Group = GroupA,RT>2.00),"Tail", _
IF(AND(Group = GroupB,RT>4.00),"Not a Tail",IF(ISBLANK(RT),"Blank Data","")))
End Function
[/VBA]

in this GroupA has three products - SFIDA,MALTA,DP180F and GroupB has four products.

for GroupA the response time need to be within 2 hrs
and for GroupB the response time need to be within 4 hrs

i have a log file which has response time(RT) in a column and Group in a column. and i need to see the RT column and Group column for the prdoucts in GroupA and GroupB then if RT value is greater than the limits of respective group then the function should return a text "Tail", if the RT value is within the Group limits then function should return "Not a Tail".

I have attached a sample of my data herewith. in the sample workbook column G has Group products and column P has the RT value.

Can anyone guide me to complete the function.

Thanks a ton
Raj