LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Insert and propagate Rows - based on a format rule

Could someone kindly offer a solution/vbscript to copy and populate rows of
data (adjusting the text string in Column A as part of the process) as
illustrated below.

The top section is an example of the source data containing batch numbers
with associated data in adjacent columns
The batch numbers in Column A will always be in this format/length
The second part of the string in column A dictates the range of individual 2
digit suffixes that the batch number / row of data pertains to

Hopefully the intention can be seen in the illustration below

Batch Ref Test1 Test2 Test3 Test4
0001-0102 GB 7.05 7.49 0.23 0.48
0001-0304 GB 7.22 7.91 0.23 0.48
0002-0102 SA 6.87 7.57 0.23 0.48
0002-0304 SA 6.77 7.33 0.24 0.48
0003-0103 PJ 7.17 7.61 0.23 0.49
0003-0406 PJ 7.11 4.72 0.23 0.60
0004-0106 PG 13.50 5.00 0.30 0.70




required result

0001-01 GB 7.05 7.49 0.23 0.48
0001-02 GB 7.05 7.49 0.23 0.48
0001-03 GB 7.22 7.91 0.23 0.48
0001-04 GB 7.22 7.91 0.23 0.48
0002-01 SA 6.87 7.57 0.23 0.48
0002-02 SA 6.87 7.57 0.23 0.48
0002-03 SA 6.77 7.33 0.24 0.48
0002-04 SA 6.77 7.33 0.24 0.48
0003-01 PJ 7.17 7.61 0.23 0.49
0003-02 PJ 7.17 7.61 0.23 0.49
0003-03 PJ 7.17 7.61 0.23 0.49
0003-04 PJ 7.11 4.72 0.23 0.6
0003-05 PJ 7.11 4.72 0.23 0.6
0003-06 PJ 7.11 4.72 0.23 0.6
0004-01 PG 13.5 5 0.3 0.7
0004-02 PG 13.5 5 0.3 0.7
0004-03 PG 13.5 5 0.3 0.7
0004-04 PG 13.5 5 0.3 0.7
0004-05 PG 13.5 5 0.3 0.7
0004-06 PG 13.5 5 0.3 0.7


Thanks


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create new records from existing ones based on 'rule'? msnyc07 Excel Worksheet Functions 1 May 28th 10 02:38 PM
insert rows based on criteria MP Excel Discussion (Misc queries) 3 December 4th 08 02:19 PM
insert rows based on criteria MP Excel Discussion (Misc queries) 0 December 3rd 08 06:36 PM
Insert rows based on value per day Mayte Excel Worksheet Functions 2 May 2nd 08 03:03 PM
Insert new rows based on Data in other rows mg_sv_r Excel Worksheet Functions 5 November 21st 07 01:51 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"