Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2012, 10:49 PM
Jasa P Jasa P is offline Separate the digits into 3 combinations Windows XP Separate the digits into 3 combinations Office 2007
Novice
Separate the digits into 3 combinations
 
Join Date: Apr 2012
Posts: 13
Jasa P is on a distinguished road
Default Separate the digits into 3 combinations

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
Reply With Quote
  #2  
Old 08-19-2012, 11:04 PM
macropod's Avatar
macropod macropod is online now Separate the digits into 3 combinations Windows 7 64bit Separate the digits into 3 combinations Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Cross-posted at: http://www.vbaexpress.com/forum/showthread.php?t=43322
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate the digits into 3 combinations Can I use the filter function to separate letters into separate files? drhauser Mail Merge 2 12-14-2011 02:18 PM
how to have separate references in each chapter staphlee Word 1 11-06-2011 05:54 AM
Separate the digits into 3 combinations Problems merging in last 4 digits of an account higher than 16 digits Glynda Mail Merge 1 04-08-2011 12:17 AM
Any easy way to separate a Word document into separate files? SamHelm Word 0 08-21-2010 05:29 AM
How to delete first 6 Digits and one Space from a CELL? Learner7 Excel 3 08-10-2010 04:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft