hey all ;) i have code that uses a code to converts this table : A B 1 name1 | S1/S2 2 name2 | M1/M2 . . n namen | D1/D2
''''' into this : ''''''''' A B 1 name1 | S1 2 name1| S2 3 name2 | M1 4 name2 |M2 . . n namen | D1 n+1 namen |D2 [code] Dim Rng As Range, Dn As Range, oVal, oSp As Long Dim Ray, c As Long Set Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp)) ReDim Ray(1 To Rng.Count * 4, 1 To 2) For Each Dn In Rng oVal = Split(Dn.Offset(, 1), "/") If UBound(oVal) > 0 Then For oSp = 0 To UBound(oVal) c = c + 1 Ray(c, 1) = Dn Ray(c, 2) = oVal(oSp) Next oSp Else c = c + 1 Ray(c, 1) = Dn Ray(c, 2) = Dn.Offset(, 1) End If Next Dn Range("C2").Resize(c, 2).Value = Ray [/code] what should i modify in this code to convert this table : A B C E 1 name1 | value1 | value2 | S1/S2 2 name2 | value1 | value2 |M1/M2 . . n namen | value1 | value2 |D1/D2 into this; A B C E 1 name1 | value1 | value2 | S1 2 name1 |value1 | value2 | S2 3 name2 | value1 | value2 |M1 4 name2 | value1 | value2 |M2 . . n namen | value1 | value2 |D1 n+1 namen | value1 | value2 |D2 need ur help plz ;) regards --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---