Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Separate Numbers From Text

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Separate Numbers From Text

    Suppose I have SPSS/HR/AF00093, and I want to take from right just 00093, how it is possible???
    I want to do this in excel sheet...

  • #2
    Re: Separate Number From A Sentence

    Extract Number From Text Strings The result cell will need a Custom Format like: 00000 to retain leading zeros.

    Comment


    • #3
      Re: Separate Numbers From Text

      also an UDF
      =tanha(A1)
      Code:
      Function tanha(txt As String) As String
      With CreateObject("VBScript.RegExp")
          .Pattern = "-?\d+"
          tanha = .execute(txt)(0)
      End With
      End Function

      Comment


      • #4
        Re: Separate Numbers From Text

        Hi there,

        Assuming that you will always want to get the last 5 characters, and assuming that your value is in A1, use this in B1:

        =RIGHT(A1,5)

        Where 5 is the number of characters you want to display.

        Cheers,
        Averil
        -------------
        Averil Pretty

        Comment


        • #5
          Re: Separate Numbers From Text

          Originally posted by jindon
          also an UDF
          =tanha(A1)
          Code:
          Function tanha(txt As String) As String
          With CreateObject("VBScript.RegExp")
              .Pattern = "-?\d+"
              tanha = .execute(txt)(0)
          End With
          End Function
          Thanks a bunch, it is amazing...Mr. jindon, and thanks for all for replying and guiding

          Want to know how separate the right of the SPSS/AFG/HR/FA00093 into two parts 1. SPSS/AFG/HR/ 2. FA00093, I mean to separate from right while we reach the first / symbol
          Last edited by cs2007; October 28th, 2007, 15:29.

          Comment

          Trending

          Collapse

          There are no results that meet this criteria.

          Working...
          X