I want to convert the name to value, like this
A=1, B=2, C=3 E=4 ......(A-Z)
ABC=6
please help me. I searched the solution more than one year but it is futile.
I want to convert the name to value, like this
A=1, B=2, C=3 E=4 ......(A-Z)
ABC=6
please help me. I searched the solution more than one year but it is futile.
I can only that as a User Defined Function.
select the developer tab, select visual basic
click on insert and then module
paste this code into the module that opens and close it
Enter abc into A1![]()
Function abc(T As String) For Count = 1 To Len(T) abc = abc + Asc(UCase(Mid(T, Count, 1))) - 64 Next End Function
EnterFormula:
=abc(a1) into B1
Last edited by mehmetcik; 01-14-2017 at 08:42 PM.
My General Rules if you want my help. Not aimed at any person in particular:
1. Please Make Requests not demands, none of us get paid here.
2. Check back on your post regularly. I will not return to a post after 4 days.
If it is not important to you then it definitely is not important to me.
Hi and welcome to the forum
Here's a User Defined Function
enter =Wordsum(A1)
![]()
Function WordSum(st As String) Dim ar() As String, l As Long, lSum As Long ReDim ar(Len(st)) For l = 1 To Len(st) If Asc(Mid(st, l, 1)) <> 32 Then If Asc(Mid(st, l, 1)) > 96 Then lSum = lSum + Asc(Mid(st, l, 1)) - 96 Else lSum = lSum + Asc(Mid(st, l, 1)) - 64 End If End If Next l WordSum = lSum End Function
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star iconbelow the post.
Welcome to the board.
A B C 1abc 6B1: {=SUM(CODE(MID(UPPER(A1), ROW(INDIRECT("1:" & LEN(A1))), 1)) - 64)} 2Sudesh 76
Entia non sunt multiplicanda sine necessitate
.... or an array formula
Formula:
=SUM(IF(CODE(A1)>96,(CODE(A1)-96),(CODE(A1)-64))*(ROW(INDIRECT(1&":"&LEN(A1)))))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks