or
Code:Sub M_snb() sn = Cells(13, 3).CurrentRegion.Offset(3) sp = Cells(13, 3).CurrentRegion.Offset(3).Resize(Application.Sum(Application.Index(sn, 0, 1)) + UBound(sn)) For j = 1 To UBound(sn) c00 = c00 & "," & j & Replace(String(sn(j, 1), ","), ",", "," & UBound(sp)) Next Cells(13, 3).CurrentRegion.Offset(3).ClearContents Cells(16, 3).Resize(UBound(sp), UBound(sp, 2)) = Application.Index(sp, Application.Transpose(Split(Mid(c00, 2), ",")), [transpose(row(1:10))]) End Sub




Reply With Quote
Bookmarks