# Need Help Please with Excel Formula

#### Lindee

##### New Member
 Joe, I'm sorry, I don't know how or why, If I knew the answer, we would be millionaires(you and me) lol As for VBA not sure my computer could handle it. Just a simple matrix to convert the numbers, I want to put in 116 and get 661. I just want to thank you for you help. Linda

<tbody>
</tbody>

### Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

#### Joe4

Joe, I'm sorry, I don't know how or why, If I knew the answer, we would be millionaires(you and me) lol
I am just asking what YOU are looking for here with your question.
Just trying to spec out exactly what your request here is.
I am not able to help if I don't really understand what you want.

Even with this "simple" part here:
116~661
1=6 so 11 becomes 661
787~887
I am not sure how to do this WITHOUT using VBA. Without VBA, it would have to be a very complex formula that is beyond my knowledge level!

So unfortunately, with the use of VBA, I don't think I am going to be able to be of much assistance.
Sorry.

Last edited:

#### Lindee

##### New Member
Joe you know much more about Excel and VBA than I do....so...use the VBA. What I'm looking for is just as stated. If I put in 116 it should show a result of 661, if I put in 112, it should show a result of 662. I now know after talking to you it is a little more
complex than I had thought. So Help me if you can, as I said, I thank you for your time and effort.

#### Marcelo Branco

##### MrExcel MVP
I'm following this thread but I'm just as confused as Joe4 about what exactly you want.

If only the conversion following the rules: 1 to 6; 2 to 7; 3 to 8; 4 to 9; 5 to 0; 6 to 1; 7 to 2; 8 to 3; 9 to 4 and 0 to 5, maybe

 A​ B​ 1​ Original​ Converted​ 2​ 116​ 661​ 3​ 787​ 232​ 4​ 234​ 789​ 5​ 278​ 723​ 6​ 109​ 654​

<tbody>
</tbody>

Formula in B2 copied down
=SUMPRODUCT(MOD(MID(A2,{1;2;3},1)+5,10)*{100;10;1})

M.

Last edited:

#### Lindee

##### New Member
That will work.
I will take the code that you developed and from there try to expand it to include other numbers. Thank Both of you soooo much. If I need help, can I ask again? You have been so kind, I didn't want to be a bother.

#### Joe4

If I need help, can I ask again? You have been so kind, I didn't want to be a bother.
Sure. If it is a new question, it is best to post it in a new thread (as it will get more "looks" since it does not have any replies).
You would only post back to this original thread if it is a directly related follow-up to the question or responses here.

#### Lindee

##### New Member
Opp's recieve a value error when trying to place this in excel,,, I have tried retyping formula in excel, I placed the image in the same columns still have error. The exact error is "A value used in the formula is the wrong data type. Whatever the heck that means.

#### Marcelo Branco

##### MrExcel MVP
Opp's recieve a value error when trying to place this in excel,,, I have tried retyping formula in excel, I placed the image in the same columns still have error. The exact error is "A value used in the formula is the wrong data type. Whatever the heck that means.
Could you post the data along with formulas you've used?

M.

#### Lindee

##### New Member
I posted it to a page to save and work on. I copied the chart you made,then posted the formula in column B of the chart and then received the error. I'm sure I did something wrong, so I recopied the formula in the formula bar,,,making sure it was exactly as you gave, still the same error. Here's a copy of what I posted, pressed enter and received the error. What am I doing wrong? I have Excel 2007 if that helps any.

 A B 1 Original Converted 2 116 =SUMPRODUCT(MOD(MID(A2,{1;2;3},1)+5,10)*{100;10;1}) 3 787 232 4 234 789 5 278 723 6 109 654

<tbody>
</tbody>

Last edited:

#### Marcelo Branco

##### MrExcel MVP
Type in an empty cell this formula
=ISNUMBER(A2)

copy down and tell us the results

M.

1,089,475
Messages
5,408,462
Members
403,208
Latest member
JFoley182