Library (Numbers)

  Working with Integer/Long/Double:

  1. To Add or Sum. (Microsoft Reference - Plus Operator)
    • Use plus sign "+".
      1 + 1 'Returns 2
    • Use of Sum function.
      Application.WorksheetFunction.Sum(myRange)
  2. To Minus or subtract. (Microsoft Reference - Minus Operator)
    • Use minus sign "-".
      1 - 1 'Returns 0
    • Use of Sum function (No Subtract function)
      Application.WorksheetFunction.Sum(myRange)
  3. To Multiply. (Microsoft Reference - Multiply Operator)
    • Use asterisk sign "*".
      2 * 2 'Returns 4
    • Use of Product function.
      Application.WorksheetFunction.Product(myRange)
  4. To Divide. (Microsoft Reference - Divide Operator)
    • Use forward slash sign "/".
      7 / 2 'Returns 3.5
    • Use of Quotient function (Returns integer portion only)
      Application.WorksheetFunction.Quotient(7, 2) 'Return 3
  5. To get Minimum Value in Range. (Microsoft Reference - Min function)
    • Use of Min function with array.
      Application.WorksheetFunction.Min(1, 5, 3, 4, 6) 'Returns 1
    • Use of Min function with range.
      Application.WorksheetFunction.Min(myRange) 'myRange as range
  6. To get Maximum Value in Range. (Microsoft Reference - Max function)
    • Use of Max function with array.
      Application.WorksheetFunction.Max(1, 5, 3, 4, 6) 'Returns 6
    • Use of Max function with range.
      Application.WorksheetFunction.Max(myRange) 'myRange as range
  7. To get Average Value in Range. (Microsoft Reference - Average function)
    • Use of Average function with array.
      Application.WorksheetFunction.Average(1, 5, 3, 4, 6) 'Returns 3.8
    • Use of Average function with range.
      Application.WorksheetFunction.Average(myRange) 'myRange as range
  8. To get Round number. (Microsoft Reference - Round function)
    • Use of Round function.
      Round(3.14, 0) 'Returns 2
      Round(3.14, 1) 'Returns 3.1
      Round(3.54, 0) 'Returns 4
  9. To get Round Up number. (Microsoft Reference - RoundUp function)
    • Use of RoundUp function.
      Application.WorksheetFunction.RoundUp(3.14, 0) 'Returns 4
  10. To get Round Down number. (Microsoft Reference - RoundDown function)
    • Use of RoundDown function.
      Application.WorksheetFunction.RoundDown(3.54, 1) 'Returns 3.5
  11. To ranking position. (Microsoft Reference - Rank function)
    • Use of Rank function.
      Application.WorksheetFunction.Rank(Number to be rank, Range, 1) 'Returns number rank postion
  12. To get number without any sign normally "-". (Microsoft Reference - Abs function)
    • Use of Abs function.
      Abs(-3.14) 'Returns 3.14

No comments:

Post a Comment