Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Experts,

This is really a two part question:

1. How to determine the total numerical value of a string

2. When a "Number or Value" is determined, then what random string of 16 characters (Hexadecimal...(0 - F), that will produce that value.

Example:

If I have two numbers:

**41289M **and **80201BA32115**

1. I would want the numerical**value **for each number string.

2. After "massaging" the numbers, it generates another Value.

3. This massaged value is then used to produce a random 16 digit hexadecimal number that equals the value from step 2.

Cook09

This is really a two part question:

1. How to determine the total numerical value of a string

2. When a "Number or Value" is determined, then what random string of 16 characters (Hexadecimal...(0 - F), that will produce that value.

Example:

If I have two numbers:

1. I would want the numerical

2. After "massaging" the numbers, it generates another Value.

3. This massaged value is then used to produce a random 16 digit hexadecimal number that equals the value from step 2.

Cook09

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get this solution by purchasing an Individual license!
Start your 7-day free trial.

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

When I look at the workbook, it doesn't seem to provide what I requested. For instance 41289M would probably equal 66. Cell B2 shows 41289.

A UDF would be fine, especially if it meets the criteria listed above.

cook09

Can you help me understand how come 41289 = 66?? I dont understand the logic connection between two..

Saurabh...

41289M 4+1+2+8+9+22 (M=22) ... However I was wrong... M=32 if A = 10, B=11, etc. An M wouldn't normally be there. I need to go and find out how they use it. Although, the other number follows hexadecimal notation (0 - 9, then A= 10, B =11...F=16).

So, 80201BA32115 = 8 +0+2+0+1+11+10+3+2+1+1+5 = 44

Cook09

However if A=10 then M=22 only...also enclosed is the file and UDF for your reference for what you are looking for..

```
Function getvalues(rng As Range)
Dim i As Long, z As Long
For i = 1 To Len(rng.Value)
If IsNumeric(UCase(Mid(rng.Value, i, 1))) Then
getvalues = getvalues + (Mid(rng.Value, i, 1) * 1)
Else
z = Asc(UCase(Mid(rng.Value, i, 1))) - 55
getvalues = getvalues + z
End If
Next i
End Function
```

Excel file...

Saurabh...

getvalues.xlsm

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trialCook09

I'm not sure i follow you here..What you want to do in part-2? Can you give me more context or clarity about the same.?

Saurabh...

If I want a number that equals 65, then that value would translate into any number

cook09

I will keep that as a separate then this question as if you notice your part-2 in itself is a complete question in it which required to write a fresh program in itself. Also i'm not sure about how do you want to call out that process so if i understand correctly this is what you want to do..

From Hexadecimal you want to convert it to number Part-1 and Part-2 will be from a number to Hexadecimal ...

And currently i have solved part-1..Now you want to solve a Part-2 which basis of my assessment will be a separate question in itself as it involves complex code of logic to be written for it rather then part of a same question...

I can live with that, they are two separate items, which were blended into one topic. I'll close this and open a new question.

Thanks....

cook09

Microsoft Excel

From novice to tech pro — start learning today.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get this solution by purchasing an Individual license!
Start your 7-day free trial.

41289M

Then in B1 you can apply this..

Open in new window

Enclosed workbook for your reference...

Also just to add a VBA solution will be much more simpler by that i mean writing a UDF..let me know if you are interested in the same...

Saurabh...

Getnumber.xlsx