2024年4月10日发(作者:)
Public data_title
Function P_ABOUT()
about_
about_ = True
End Function
Function P_HELP()
Hyperlink "/wiki/formula-plus"
P_HELP = "请在打开的网页中查看"
End Function
Function P_SUM_MERGE(ByVal sum_area As range, Optional ByVal direction As Integer = 0)
Dim thisCell As range, new_area As range
Set thisCell = ll
If ells Then
If direction = 0 Then
Set new_area = Rows( & ":" & +
- 1)
Else
Set new_area = Columns(Chr( + 64) & ":" & Chr(
+ - 1 + 64))
End If
Set sum_area = Intersect(sum_area, new_area)
End If
If Not sum_area Is Nothing Then
P_SUM_MERGE = (sum_area)
Else
P_SUM_MERGE = 0
End If
End Function
Function MAXIFS(ByVal max_range, ByVal criteria_range1, ByVal criteria1, ParamArray
criterias())
Dim var_len As Integer, last_r As Long
Dim offset_c As Integer, checkOK As Boolean, max_value
Dim cri_range As range, cri As String
var_len = UBound(criterias) + 1
If var_len Mod 2 = 1 Then
te ("" * 1)
End If
last_r = (max_,
)
max_value = -
For r = 1 To last_r
offset_c = criteria_ - max_
checkOK = max_(r).Offset(0, offset_c) = criteria1
If var_len >= 2 Then
For i = 0 To var_len - 2 Step 2
Set cri_range = criterias(i)
offset_c = cri_ - max_
cri = criterias(i + 1)
checkOK = checkOK And max_(r).Offset(0, offset_c) = criterias(i
+ 1)
Next
End If
If checkOK Then
max_value = (max_value, max_(r))
End If
Next
If max_value = - Then
max_value = "" + 1
End If
MAXIFS = max_value
End Function
Function MINIFS(ByVal min_range, ByVal criteria_range1, ByVal criteria1, ParamArray
criterias())
Dim var_len As Integer, last_r As Long
Dim offset_c As Integer, checkOK As Boolean, min_value
Dim cri_range As range, cri As String
var_len = UBound(criterias) + 1
If var_len Mod 2 = 1 Then
te ("" * 1)
End If
last_r = (min_,
)
min_value =
For r = 1 To last_r


发布评论