Results 1 to 10 of 10

Convert "text character" into unique values

Threaded View

  1. #7
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Convert "text character" into unique values

    Hi can you try this UDF

    Function SumLetters(Cell As Range) As Double
        Dim Txt As String
        Dim j As Long, MySum As Long
        
        Txt = Cell.Value
        
        Application.Volatile
        For j = 1 To Len(Txt)
            If Asc(UCase(Mid(Txt, j, 1))) >= 65 And Asc(UCase(Mid(Txt, j, 1))) <= 90Then
                MySum = MySum + Asc(Mid(Txt, j, 1)) - 64
            Else
                MySum = MySum + Val(Mid(Txt, j, 1))
            End If
        Next j
        
        SumLetters = MySum
    End Function
    Then say in cell A1 pur ABBBA 3 and in B1 this formula
    =SumLetters(A1)
    Answer would be 11
    Last edited by contaminated; 02-03-2010 at 02:36 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1