Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

VBA-Excel: String Functions – Len()

Description:

The Len func­tion returns the num­ber of char­ac­ters in a string includ­ing spaces.

Format:

Len (str­Main­String)

Arguments:
  • str­Main­String
    • Manda­tory
    • Type: String
    • String who’s both num­ber of char­ac­ters to be returned.
Function FnLen()

    Dim strMainString

    strMainString = "   Sumit Jain  "

    MsgBox "No of characters (including spaces) are” & Len(strMainString)    

End Function
Len()

Len()

Also Read About  Other String() Functions

INSTR()                       |                         Instr­REV()                       |                        LCase()

UCase()                      |                         Left()                                |                        Right()

LTrim()                        |                         Mid()                                 |                        Trim()

RTrim()                       |                        Replace()                          |                        Space()

Len()                           |                        Str­Comp()                         |                        String()

Happy Macro­ing :)

Sumit Jain

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: