Advertisement
Advertisement
| 01.24.2008 at 06:47AM PST, ID: 23107761 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: |
Private Sub cmdNetShip_Click()
'Opens one of the source files
Workbooks.Open "SKU Rationalization_gross & net sales for 2007.xls", False, True
With ActiveWorkbook
With .Worksheets("gross & net sales")
'array that holds the list of id #s from the source file
sourcesku = .Range("A5:" & .Range("A5").End(xlDown).Address).Value
'array that holds the data for the net sales column (adjacent to the id # column)
netsales = .Range("b5:" & .Range("b5").End(xlDown).Address).Value
End With
End With
'Open the master excel file
Workbooks.Open "master excel.xls", False, False
With ActiveWorkbook
With .Worksheets("ALL")
mastersku = .Range("a3:" & .Range("a3").End(x1Down).Address).Value
'use the SKUs (in the 2 arrays) from both sheets to do a vlookup
'print corresponding values from net sales and gross sales into the correct box in the master excel
End With
End With
End Sub
|