alinka
Board Regular
- Joined
- Oct 30, 2002
- Messages
- 70
Hi,
I have Excel 97. I have a set of numbers that need to be converted. Currently, I use a set of formulas for the converstion:
1) A six digit number in A6 needs to be converted to a new number using these formulas:
first I need to separate each number
=MID($A6, 1, 1)
=MID($A6, 2, 1)
=MID($A6, 3, 1)
=MID($A6, 4, 1)
=MID($A6, 5, 1)
=MID($A6, 6, 1)
then I need take the sum of each digit and divide the sum by 10:
=(B7+C7+D7+E7+F7+G7)/10
then I need to take the digit before the decimal point:
=MID(H7, 3, 1)
Then I need to make sure that if the above formula returns nothing, we show 0
=IF(I7="",0,I7)
At last, the formula creates the new number by combining a prefix: AR00 with the original 6 digit number and adding the new calculated last digit affixed at the end which is calculated from the above formulas:
=CONCATENATE("AR00",A7,J7)
Here's what I need help with:
1) I need to figure out how to make all these formulas into one formula.
2) I also would like to know how I can instead create a form where a user can input an old 6 digit number, and get a new number shown to him.
Please let me know if you guys can help me. Thanks so much!
I have Excel 97. I have a set of numbers that need to be converted. Currently, I use a set of formulas for the converstion:
1) A six digit number in A6 needs to be converted to a new number using these formulas:
first I need to separate each number
=MID($A6, 1, 1)
=MID($A6, 2, 1)
=MID($A6, 3, 1)
=MID($A6, 4, 1)
=MID($A6, 5, 1)
=MID($A6, 6, 1)
then I need take the sum of each digit and divide the sum by 10:
=(B7+C7+D7+E7+F7+G7)/10
then I need to take the digit before the decimal point:
=MID(H7, 3, 1)
Then I need to make sure that if the above formula returns nothing, we show 0
=IF(I7="",0,I7)
At last, the formula creates the new number by combining a prefix: AR00 with the original 6 digit number and adding the new calculated last digit affixed at the end which is calculated from the above formulas:
=CONCATENATE("AR00",A7,J7)
Here's what I need help with:
1) I need to figure out how to make all these formulas into one formula.
2) I also would like to know how I can instead create a form where a user can input an old 6 digit number, and get a new number shown to him.
Please let me know if you guys can help me. Thanks so much!