Hi, I have some problems here... Would you mind to help?
I need to separate digits with specs:
1. consist of 4 numbers
2. have 3 multipliers
onto
1. 4digits with first multiplier
2. last 3 digits with second multiplier
3. last 2 digits with third multiplier
For example:
B09=3621.621.21.8639.639.39x10/12x10/0419x2.2.2/20.05.21.00.99x2/78.87.42.57x3/6328x3.4.5/3408x5.5.5/08x5/7934.3870.7369x3.3.7/728.328x3/28x3
become
3621.621.21.8639.639.39x10/12x10/0419x2/419x2/19x2/20.05.21.00.99x2/78.87.42.57x3/6328x3/328x4/28x5/3408x5/408x5/08x5/08x5/7934.3870.7369x3/934.870.369x3/34.70.69x7/728.328x3/28x3
So, basically like this:
0419x2.2.2 --> 0419x2/419x2/19x2
6328x3.4.5 --> 6328x3/328x4/28x5
3408x5.5.5 --> 3408x5/408x5/08x5
7934.3870.7369x3.3.7 --> 7934.3870.7369x3/934.870.369x3/34.70.69x7
For other examples:
A01=2324.3545.2356.5657.2137.6466x4.4.6/3425.3455x3.6.6/132x2.3/4544.31234.4565x4/45.435.56.3/456x3.3
A02=54.45.55.34x4/456.565.676x3/4564.3453.5775.2342x4.5.6/5646.2342.7324.5466.3242x10.20.15/12.23.45.67x5
C05=123.4543.5765.12.67.234x10/2324.4565.4564.1233x5/2423.2344.4563x3.5.5/2342.3435.5675.2342.2424.6577x3.10.12
and so on...
Become
2324.3545.2356.5657.2137.6466x4/324.545.356.657.137.466x4/24.45.56.57.37.66x6/3425.3455x3/425.455x6/25.55x6/132x2.3/4544.31234.4565x4/45.435.56.3/456x3.3
54.45.55.34x4/456.565.676x3/4564.3453.5775.2342x4/564.453.775.342x5/64.53.75.42x6/5646.2342.7324.5466.3242x10/646.342.324.466.242x20/46.42.24.66.42x15/12.23.45.67x5
123.4543.5765.12.67.234x10/2324.4565.4564.1233x5/2423.2344.4563x3/423.344.563x5/23.44.63x5/2342.3435.5675.2342.2424.6577x3/342.435.675.342.424.577x10/42.35.75.42.24.77x12
If you don't mind, the macro could works for entire data, because in the word file, it doesn't consist for 1 or 3 data like samples above, but it consists of a lot of data...
Quote:
First, I want to let you know (x) is multiplication. But, dot (.) is sum
My data is processed in Word. I'm using 2 macro:
First macro is for replacing some characters that are unwanted (record macro)
Second macro is for lowering capital (X) and changing (x) after first (x) to dot (.)
Then, the data is processed in Excel. I'm using 1 macro:
This macro is for sum the multiplications, ex:
10.20.30x10/ --> the result is 30
235.458.101x25.20/ --> the result is 135
1120.1135x10/ --> the result is 20
So, numbers before (x) is counted by the sum of dot (.)+1 -->(first result)
Number/s after (x) is counted by the sum of numbers between (x) and slash (/) -->(second result)
The final result is multiplication of first and second result
There are 3 ways for possible numbers before (x)
2 numbers/+dot(.), ex: 01 or 45 etc
3 numbers/+dot(.), ex: 245 or 939 etc
4 numbers/+dot(.), ex: 1174 or 8364 etc
Possible sum after (x)
For 2 numbers before (x) --> 1 sum
For 3 numbers before (x) --> 1 or 2 sum
For 4 numbers before (x) --> 1 or 2 or 3 sum
|
Any help would be great..
Thank you so much for helping...
Regards,
Jasa