VBA equivalent to Excel's mod function

后端 未结 8 1227
抹茶落季
抹茶落季 2020-11-27 06:31

Is there a vba equivalent to excel\'s mod function?

8条回答
  •  悲哀的现实
    2020-11-27 06:57

    Function Remainder(Dividend As Variant, Divisor As Variant) As Variant
        Remainder = Dividend - Divisor * Int(Dividend / Divisor)
    End Function
    

    This function always works and is the exact copy of the Excel function.

提交回复
热议问题