Sub Test()Dim myRange As RangeSet myRange = Application.InputBox("选定区域", Default:="A1", Type:=8)Dim mySumif As SinglemySumif = Application.WorksheetFunction.SumIf(myRange, "=1", myRange)MsgBox mySumifEnd Sub
有很多骂人的话