Advertisement
Guest User

Untitled

a guest
Aug 25th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. Name, Description, Price A, Price B, Price C, SKU A, SKU B, SKU C
  2. name1, desc1, 14.95, 19.95, , sku1A, sku1B,
  3. name2, desc2, 4.95, 9.95, 12.95, sku2A, sku2B, sku2C
  4. name3, desc3, 49.95, , , sku3A, ,
  5.  
  6. Name, Description, SKU, Price
  7. name1, desc1, sku1A, 14.95
  8. name1, desc1, sku1B, 19.95
  9. name2, desc2, sku2A, 4.95
  10. name2, desc2, sku2B, 9.95
  11. name2, desc2, sku2C, 12.95
  12. name3, desc3, sku3A, 49.95
  13.  
  14. 1 |Sub NewLayout()
  15. 2 | For i = 2 To Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row
  16. 3 | For j = 0 To 2
  17. 4 | If Cells(i, 3 + j) <> vbNullString Then
  18. 5 | intCount = intCount + 1
  19. 6 | Cells(i, 1).Copy Destination:=Cells(intCount, 10)
  20. 7 | Cells(i, 2).Copy Destination:=Cells(intCount, 11)
  21. 8 | Cells(i, 3 + j).Copy Destination:=Cells(intCount, 12)
  22. 9 | Cells(i, 6 + j).Copy Destination:=Cells(intCount, 13)
  23. 10| End If
  24. 11| Next j
  25. 12| Next i
  26. 13|End Sub
  27.  
  28. A9
  29.  
  30. SKU
  31.  
  32. Price
  33.  
  34. * Training required
  35. Comment
  36.  
  37. * Training required
  38. Comment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement