Hello,
I am having a problem trying to set up a code. The 1st attached file is what the file first looks like. Now what i am trying to turn the file into is having the order-id order-item-id quantity ship-date carrier-code carrier-name tracking-number ship-method for every order-item-id. The first 6 lines are order ID's with multiple order-item-id's. But i want to make it where there is one order-item-id per line. so since you have row 2 with the column B being the first order-item-id for that order ID. Now the other 5 order-item-id's need to have a new column that has order-id order-item-id quantity ship-date carrier-code carrier-name tracking-number ship-method. So basically you are taking the other 5 order-item-id in the original line (row 2) and giving them there own line like the first order-item-id has in column B. The 2nd attached file is what i kind of have right now. Now i need the code to have where column B will equal 0 if there is no order item ID through the order-item-id's from column's I to M. There will be thousands of original lines so i need it where i can just drag the code down and for every 6 lines the rows move up by one and not move up one row every time because i need the 6 lines to have the original row its getting the information from 6 times. Any help would be great! Thank you so much!
Here is a txt version of the original:
order-id order-item-id quantity ship-date carrier-code carrier-name tracking-number ship-method order-item-id order-item-id order-item-id order-item-id order-item-id
002-5502896-1809859 123456789 2009-12-10 FedEx 433817812040 Expedited 389475634 283947568 192837465 182937465 192837465
105-6556036-7641838 758477564 2009-12-10 FedEx 433817812050 Expedited 867564756 283947567 192837465 192034758 884756374
104-7836288-9953038 273856644 2009-12-10 FedEx 433817812061 Expedited 098473625 123787894 948746354 192837465 947377635
102-0145680-7235443 884477323 2009-12-10 FedEx 809190734247055 Standard 758688473 102937666 188888345 102938475 049586734
102-0139115-1319474 389909345 2009-12-10 FedEx 809190734247062 Standard 234908564 888833333 444477775 748853489 109878909
102-0125220-1997877 223388654 2009-12-10 FedEx 809190734247079 Standard 789456300 109846573 578674632 198674658 195746323
Here is a txt version of what i have so far:
order-id order-item-id quantity ship-date carrier-code carrier-name tracking-number ship-method order-item-id order-item-id order-item-id order-item-id order-item-id
002-5502896-1809859 123456789 f 2009-12-10 FedEx 433817812040 Expedited 389475634 283947568 1928343534 18295354 192834534
105-6556036-7641838 758477564 2009-12-10 FedEx 433817812050 Expedited 86756434534 2839434534 19234534 19203345345 884734534
104-7836288-9953038 273856644 2009-12-10 FedEx 433817812061 Expedited 0984734534 123787894 948746354 1928356756 947377635
102-0145680-7235443 884477323 2009-12-10 FedEx 809190734247055 Standard 75868834534 102937666 188888345 1029384654564 04958646734
102-0139115-1319474 389909345 2009-12-10 FedEx 809190734247062 Standard 2349083453 888833333 444477775 748853489 10985676509
102-0125220-1997877 223388654 2009-12-10 FedEx 809190734247079 Standard 78945635765 109234324 57867424234 1986745656758 195746323
=A2 =B2 =C2 =D2 =E2 =F2 =G2 =H2
=IF(B9=I2,A8,A3) =IF((AND(A2=A3,I2<0)),"",I2) =C2 =D2 =E2 =F2 =G2 =H2
=IF(B10=J2,A8,A3) =IF((AND(A2=A3,J2>0)),"",J2) =C2 =D2 =E2 =F2 =G2 =H2
=IF(B11=k2,A8,A3) =IF((AND(A2=A3,K2>0)),"",K2) =C2 =D2 =E2 =F2 =G2 =H2
=IF(B12=l2,A8,A3) =IF((AND(A2=A3,L2>0)),"",L2) =C2 =D2 =E2 =F2 =G2 =H2
=IF(B13=m2,A8,A3) =IF((AND(A2=A3,M2>0)),"",M2) =C2 =D2 =E2 =F2 =G2 =H2
=A3 =B3 =C3 =D3 =E3 =F3 =G3 =H3
=IF(B15=I3,A3,A4) =IF((AND(A2=A3,I2<0)),"",I2) =C3 =D3 =E3 =F3 =G3 =H3
=IF(B9=I3,A3,A4) =IF((AND(A2=A3,J2>0)),"",J2) =C3 =D3 =E3 =F3 =G3 =H3
=IF(B9=I3,A3,A4) =IF((AND(A2=A3,K2>0)),"",K2) =C3 =D3 =E3 =F3 =G3 =H3
=IF(B9=I2,A2,A3) =IF((AND(A2=A3,L2>0)),"",L2) =C3 =D3 =E3 =F3 =G3 =H3
=IF(B9=I2,A2,A3) =IF((AND(A2=A3,M2>0)),"",M2) =C3 =D3 =E3 =F3 =G3 =H3
Bookmarks