Reputation: 15
I am trying to get this piece of excel function into vba code (mainly because there is no such thing as "application.worksheetfunction.if" - would be great if i can get some help here!
=quartile.exc(if((F:F=F2)*(Y:Y=1),I:I),1)
basically, i wanted to find the 25th percentile of all data in column I if two criteria are met: 1) if value of column F is the same, 2) if column Y value = 1. Otherwise return to blank.
Thank you very much!
Upvotes: 0
Views: 788
Reputation: 7891
If that formula gets you the answer you want, then you could simply use:
Activesheet.Evaluate("=QUARTILE.EXC(IF((F:F=F2)*(Y:Y=1),I:I),1)")
Upvotes: 2