ABS Function
Private Sub CommandButton1_Click()
Range("B1").Value = Abs(Range("A1"))
Range("B2").Value = Abs(Range("A2"))
Range("B3").Value = Abs(Range("A3"))
Range("B4").Value = Abs(Range("A4"))
Range("B5").Value = Abs(Range("A5"))
Range("B6").Value = Abs(Range("A6"))
End Sub
Private Sub CommandButton1_Click()
Dim max As Integer
max = Range(Range("A1"), Range("A1").End(xlDown)).Rows.Count
Dim i As Integer
For i = 1 To max
'find "a" postion in specified string
Cells(i, 2) = Abs(Cells(i, 1))
Next
End Sub
ASC Function
Private Sub CommandButton1_Click()
Range("B1").Value = Asc(Range("A1"))
Range("B2").Value = Asc(Range("A2"))
'gives the first character
Range("B3").Value = Asc(Range("A3"))
End Sub
Chr Function
Private Sub CommandButton1_Click()
Range("B1").Value = Chr(Range("A1"))
MsgBox Chr(Range("A1"))
End Sub
Int Function
Private Sub CommandButton1_Click()
Range("B1").Value = Int(Range("A1"))
Range("B2").Value = Int(Range("A2"))
End Sub
SQR Function
Private Sub CommandButton1_Click()
Range("B1").Value = Sqr(Range("A1"))
End Sub
Format Function
Private Sub CommandButton1_Click()
MsgBox Format(Range("A1"), "#,###.#")
Range("B1") = Format(Range("A1"), "#,###.##")
End Sub
Large Function
Private Sub CommandButton1_Click()
Dim num As Integer
Max = Range("C2").End(xlDown).Row
Data = Range("C2:C" & Max)
For i = 1 To 5
J = Application.WorksheetFunction.Large(Data, i)
Cells(i, 5).Value = J
Next
End Sub