Hello all. I have not got any respond yet, so i may think i will try to give a more detailed description of what i want. I have attached an example before and after.
I need some help with an excel sheet to generate new lines and columns based on the information in the sheet. I could do this manually but that will take a lot of time. The sheet have 129 lines plus heading and i guess my requested end-result will be between 1000 and 1500 lines + 3 new colums with new information.
Here is what i wish to get done.
I have som electrical cables which i will add more information to. Today my cables is identified like this:
RFOU(i)250V 4x2x0,75 (there is also a lot of other information in the sheet, some of it nice to have). This is a cable with 4 groups of wires and two wires in each group. The square of the wires is 0,75mm2. The (i) in the "RFOU(i)250V" indicates that this cable have a screen (protects the signals from interferrence from outside) for each group (individual). If (c) in "RFOU(c)250V" indicate that the cable have a collective screen, one screen for all the groups.
I need to implement what is the colour for each wire. Therefor today one line eg. RFOU(i)250V 4x2x0,75 will expand to 4x2+4=12 lines with also 3 new colums: "Group no", "Wire no" and "Wire Colour"
Wire colour always follow this pattern:
No. wire = 2 : BK – BU
No. wire = 3 : BK - BU - BN
Screen : S
This must be some kind of macro programming rule:
Screen = Individual, Set Group no to 001, 002, 003 (following the "Number of Groups") etc, Wire no to 0 and wire colour to S
Screen = Collective, Set Group no to 000, Wire no to 0 and wire colour to S.
Add new columns: "Group no", "Wire no" and "Wire Colour"
Add new lines in according to condition in column c (screen), column H (Number of groups) and column I (No. Wires).
Conditions:
Add new lines in accordance to "Number of Groups", "No. Wires" and "screen".
If screen is Individual and "Number of Groups"=2, "No. Wires"=3 amount of new lines will be:
"Number of Groups" x "No. Conductors" + "Number of Groups" -->8
Insert same data in the new rows, but set (Column W) "Group no" to 001, (Column X) "Wire no" to 0 and (Column Y) "WIRE COLOUR" to S.
For the next line set (Column W) Group no to 001, (Column X) Wire no to 1 and (Column Y) WIRE COLOUR to BK.
For the next line set (Column W) Group no to 001, (Column X) Wire no to 2 and (Column Y) WIRE COLOUR to BU.
For the next line set (Column W) Group no to 001, (Column X) Wire no to 3 and (Column Y) WIRE COLOUR to BN.
For the next line set (Column W) Group no to 002, (Column X) Wire no to 0 and (Column Y) WIRE COLOUR to S.
For the next line set (Column W) Group no to 002, (Column X) Wire no to 1 and (Column Y) WIRE COLOUR to BK.
For the next line set (Column W) Group no to 002, (Column X) Wire no to 2 and (Column Y) WIRE COLOUR to BU.
For the next line set (Column W) Group no to 002, (Column X) Wire no to 3 and (Column Y) WIRE COLOUR to BN.
If screen is Collective and "Number of Groups"=2, "No. Wires"=3 amount of new lines will be:
"Number of Groups" x "No. wires" + "1" -->7
Insert same data in the new rows, but set (Column W) Group no to 000, (Column X) Wire no to 0 and (Column Y) WIRE COLOUR to S.
For the next line set (Column W) Group no to 001, (Column X) Wire no to 1 and (Column Y) WIRE COLOUR to BK.
For the next line set (Column W) Group no to 001, (Column X) Wire no to 2 and (Column Y) WIRE COLOUR to BU.
For the next line set (Column W) Group no to 001, (Column X) Wire no to 3 and (Column Y) WIRE COLOUR to BN.
For the next line set (Column W) Group no to 002, (Column X) Wire no to 1 and (Column Y) WIRE COLOUR to BK.
For the next line set (Column W) Group no to 002, (Column X) Wire no to 2 and (Column Y) WIRE COLOUR to BU.
For the next line set (Column W) Group no to 002, (Column X) Wire no to 3 and (Column Y) WIRE COLOUR to BN.
Hope for some assistance:-)
Example before and after attached.
Bookmarks