Need Help Please with Excel Formula

Lindee

New Member
Joined
Jan 27, 2018
Messages
24
I am new to Excel and I'm trying to write a formula that will change the value of a set of numbers to a different value. i.e. 116 ~161~ 161 i.e. 225~ 552~525~ 520 for numbers 1 thru 0.
Would some kind soul Help me. I have started writing with the Subsitute function however I'm not advanced enough to go beyond the 1st 2 conversions.
Thanks in Advance.
Lindee
 
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>
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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:
Upvote 0
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.
 
Upvote 0
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:
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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.

AB
1OriginalConverted
2116=SUMPRODUCT(MOD(MID(A2,{1;2;3},1)+5,10)*{100;10;1})
3787232
4234789
5278723
6109654

<tbody>
</tbody>
 
Last edited:
Upvote 0
Type in an empty cell this formula
=ISNUMBER(A2)

copy down and tell us the results

M.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top