Home Privacy Policy Feedback Link to us Site Map Forums

Excel: Str Function (VBA only)


In Excel, the Str function returns a string representation of a number.

The syntax for the Str function is:

Str( number )

number is the value to convert to a string.


Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

For example:

Str(12) would return "12".
Str(450) would return "450"

VBA Code

The Str function can only be used in VBA code. For example:

Dim LResult As String

LResult = Str(16)

In this example, the variable called LResult would now contain the value "16".