Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

LinkBack Thread Tools Display Modes
Old 06-28-2012, 02:41 AM
Jasa P Jasa P is offline Windows XP Office 2007
Join Date: Apr 2012
Posts: 13
Jasa P is on a distinguished road
Default Macro to recap data of same numbers

Hi, I have problem here, I need to recap the data and make it efficient
Would you mind to help me?

For example:


49x140 come from
1. There are 4 of 49 before slash, so 49x5 + 49x5 + 49x5 + 49x5 ---> 49x20
2. There are 2 of 49 after slash, so 49x60 + 49x60 ---> 49x120
Then the recap for 49 ---> 49x140

Same with 41, 30, 85, 11, 94, 99, 32. they are grouped by the same multiplier

The rules:
First, I want to let you know (x) is multiplication. But, dot (.) is sum

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
The other examples:



I'm using Word 2007, Windows XP for PC, and Windows 7 for notebook
Any help would be great
Thank you


Reply With Quote

macro, recap

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Consolidating data using Macro mrjamez Excel Programming 2 05-22-2012 06:50 AM
Word Macro to get pdf data appended janith Word VBA 1 04-18-2012 12:48 AM
Importing data from excel using a macro soma104 Word 1 04-14-2011 05:10 PM
macro to pull data from multiple files psrs0810 Excel 2 10-25-2010 01:49 PM
How to write a macro to find a specified name in a list of data? Jaffa Excel 1 10-23-2010 02:39 PM

All times are GMT -7. The time now is 03:22 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc. is not affiliated with Microsoft