PDA

View Full Version : Split Cells & insert rows for equal spacing



zest1
01-18-2006, 01:51 PM
Hi, can someone please provide me with the appropriate VBA code that will split certain cells in Column A and extract specific data from A and insert into Columns B and D (leave C empty)? I have separate data sub-groups going down the sheet, and each group contains a different number of rows or data entries. The headings cells (only) of Column A need to be split, separating out 3 items: Task#, Task Description and Time.

Parsing out the “(TIME)” data into Column D should be easy. And the keyword “Task” can be used to define where to start parsing for the remainder of the cell contents.

Example:
A | B | C | D
1st (1:30) Task: task description… | (empty) | (empty) | (empty) |
1
2
3
etc.

change to this:

A | B | C | D
1st | Task: task description… | (empty) | 1:00
1
2
3
etc.


The other requirement is to add rows between each task group (which vary in number of rows) so that each group contains 10 rows deep.

Example (after splitting cells):
1st | Task: task description… | (empty) | 1:00
1
2
3

(add rows here, btwn last entry and next group so that the number of rows equal 10)
10
2nd | Task: task description… | (empty) | 2:00
1
2
3

(add rows here, btwn last entry and next group so that the number of rows equal 10)
10
3rd etc…


Thanks a lot for your help :)

mdmackillop
01-18-2006, 01:58 PM
Can you post a sample file showing your data?