2つの範囲または2つの配列を入力とし、これらの2つの範囲/配列の要素数が同じか、エラーメッセージを送信する場合は、各要素の絶対差の合計を取得しますこれらの2つの配列/範囲のサイズが同じでない場合これはVBAの問題です。私は荒い時間を抱えています。VBA(Absolute Differenceの合計)範囲
Public Function MyFunction(Rng1 As Range, Rng2 As Range)
Dim CountRng1 As Long
Dim CountRng2 As Long
Rng1.Count = CountRng1
Rng2.Count = CountRng2
If CountRng1 = CountRng2 Then
Else
MsgBox "Error, the ranges you passed to the function are not the same size"
End If
End Function
がよさそうだ、それはまだ進行中の作業ではなく、あなたの質問は何ですか? – Rosetta
入力範囲は同じ形状(行数)または同じサイズである必要がありますか? –