here is what I have right now
which honestly works amazing but lacks a few features that I need.
I appreciate all the help and tips you guys might have for me!
Code:
Function FILTERIF(select_range As range, select_column, select_row As Integer, criteria_column1 As Integer, criteria1 As String, Optional criteria_column2 As Integer, Optional criteria2 As String)Dim rows As Integer
Dim i As Integer
rows = select_range.rows.Count
Dim arrMod(1 To 99999) As String
N = 1
For i = 1 To rows
If select_range.rows(i).Columns(criteria_column1) = criteria1 Then
arrMod(N) = select_range.rows(i).Columns(select_column)
N = N + 1
End If
Next i
FILTERIF = arrMod(select_row)
End Function
- how do I let it define multiple criterias the way that Sumifs and countifs has, where you can add more than 100 criterias.
- how can I define the true/false condition for the IF statement in the excel formula itself? aka be able to define if I want the criteria to equal, not equal, be more than, or less than.
- in countifs for example, its easy, you just add a "<"& at the beggining of the criteria to apply the condition, but the way that my function is coded right now, that is not possible and I'm not sure how to code it otherwise.
I appreciate all the help and tips you guys might have for me!