OK, save this UDF in a general module (and I think PERSONAL.xlsb should work):

Code:

```
Public Function My3DStats(func As String, shts As Range, col1 As String, parm1 As String, _
col2 As String, parm2 As String, datacol1 As String, Optional datacol2 As String = "")
Dim MyDict1 As Object, MyDict2 As Object, w As Variant, ws As Worksheet, lr As Long, i As Long
Dim d1 As Variant, d2 As Variant, d3 As Variant, d4 As Variant, ctr As Long, r1 As Variant, r2 As Variant
Set MyDict1 = CreateObject("Scripting.Dictionary")
Set MyDict2 = CreateObject("Scripting.Dictionary")
For Each w In shts
Set ws = Sheets(CStr(w))
lr = ws.Cells(Rows.Count, col1).End(xlUp).Row
d1 = ws.Cells(2, col1).Resize(lr - 1).Value
d2 = ws.Cells(2, col2).Resize(lr - 1).Value
d3 = ws.Cells(2, datacol1).Resize(lr - 1).Value
If datacol2 <> "" Then d4 = ws.Cells(2, datacol2).Resize(lr - 1).Value
For i = 1 To lr - 1
If LCase(d1(i, 1)) = LCase(parm1) And LCase(d2(i, 1)) = LCase(parm2) Then
If d3(i, 1) <> "" Then
ctr = ctr + 1
MyDict1(ctr) = d3(i, 1)
If datacol2 <> "" Then MyDict2(ctr) = d4(i, 1)
End If
End If
Next i
Next w
r1 = MyDict1.items
If datacol2 <> "" Then r2 = MyDict2.items
My3DStats = "Error"
Select Case UCase(func)
Case "MAX"
My3DStats = WorksheetFunction.Max(r1)
Case "MIN"
My3DStats = WorksheetFunction.Min(r1)
Case "AVERAGE"
My3DStats = WorksheetFunction.Average(r1)
Case "MODE"
My3DStats = WorksheetFunction.Mode(r1)
Case "STDEV.S"
My3DStats = WorksheetFunction.StDev_S(r1)
Case "SKEW"
My3DStats = WorksheetFunction.Skew(r1)
Case "SLOPE"
My3DStats = WorksheetFunction.Slope(r1, r2)
End Select
End Function
```

Let's say your sheets are listed in cells N2:N4. Then you'd call the function like this:

=my3dstats("Max",$N$2:$N$4,"B",$A3,"F","shipped","I")

=my3dstats("Min",$N$2:$N$4,"B",$A3,"F","shipped","I")

=my3dstats("Average",$N$2:$N$4,"B",$A3,"F","shipped","I")

=my3dstats("Mode",$N$2:$N$4,"B",$A3,"F","shipped","I")

=my3dstats("STDEV.S",$N$2:$N$4,"B",$A3,"F","shipped","I")

=my3dstats("SKEW",$N$2:$N$4,"B",$A3,"F","shipped","I")

=my3dstats("Slope",$N$2:$N$4,"B",$A3,"F","shipped","I","K")

First parameter is the function you want, next is the list of sheets, next is the first criteria column, next is what that must equal, next is the 2nd criteria column, next is what that must equal, last is the column where the data is. (For Slope, notice there is an extra column). Empty cells in the data column are ignored.

I can't say how fast it runs, should be pretty fast. It depends on how much data you have and how many formulas. Not fancy, in your original formula, I noticed that you are finding the MAX of a sum of columns, I and G. You'll need to create a helper column that is =I2+G2, and use that in the UDF. I considered getting fancier, but regained my senses! Hope this gives you some ideas.