Hello. Very new to VBA (very new). I have a spreadsheet with three columns and need to do some work in the last two columns.
[Sheet 1].[Column A] - ID
[Sheet 1].[Column B] - BUILDING
[Sheet 1].[Column C] - DESC
<tbody>
</tbody>
Columns B and C can contain multiple 'records' of data which are separated in the same cell by a return sign. For example, ID = A, the text "L1" and "L2" are separated by a paragraph symbol. The same goes for the text in Column C. "Very Large" and "Extended" are separated by a return symbol. The catch he is, the way this system reporting was designed, L1 is connected with Very Large, and L2 is connected with Extended, and L3 is connected with Tiny. So, basically the data which is connected to each other is the same just separated by a paragraph sign.
What I am trying to get VBA for, is to insert as many rows as need to split up the data in columns B and C; and then copy down the ID into the rows below it as well.
ANSWER:
<tbody>
</tbody>
[Sheet 1].[Column A] - ID
[Sheet 1].[Column B] - BUILDING
[Sheet 1].[Column C] - DESC
ID | BUILDING | DESC |
A | L1 L2 | Very Large Extended |
B | L1 L3 L4 | Extra Large Tiny Long |
C | S1 | Small |
D | F3 F4 | Fort Fortable |
<tbody>
</tbody>
Columns B and C can contain multiple 'records' of data which are separated in the same cell by a return sign. For example, ID = A, the text "L1" and "L2" are separated by a paragraph symbol. The same goes for the text in Column C. "Very Large" and "Extended" are separated by a return symbol. The catch he is, the way this system reporting was designed, L1 is connected with Very Large, and L2 is connected with Extended, and L3 is connected with Tiny. So, basically the data which is connected to each other is the same just separated by a paragraph sign.
What I am trying to get VBA for, is to insert as many rows as need to split up the data in columns B and C; and then copy down the ID into the rows below it as well.
ANSWER:
ID | BUILDING | DESC |
A | L1 | Very Large |
A | L2 | Extended |
B | L1 | Extra Large |
B | L3 | Tiny |
B | L4 | Long |
C | S1 | Small |
D | F3 | Fort |
D | F4 | Fortable |
<tbody>
</tbody>