Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub LeasePriceModel_Button2_Click()
- currentWorksheet = 16
- currentItem = 16
- standardSheetNumber = 15
- mySheets = Worksheets.Count
- firstProduct = 0
- lastProduct = 14
- StandardRowsPCList = 15
- equipmentSheet = 2
- productListEnd = Sheets(2).Range("E16").End(xlDown).Row - StandardRowsPCList
- For i = standardSheetNumber To mySheets
- For j = 0 To productListEnd
- ProductCode = Sheets(equipmentSheet).Cells(currentItem + j, 5).Value
- productQty = Sheets(equipmentSheet).Cells(currentItem + j, 1).Value
- productCost = Sheets(equipmentSheet).Cells(currentItem + j, 10).Value
- For k = firstProduct To lastProduct
- pcToCheck = Sheets(i).Cells(currentItem + k, 1).Value
- If pcToCheck = ProductCode Then
- Sheets(i).Cells(currentItem + k, 6).Value = productCost
- Sheets(i).Cells(currentItem + k, 4).Value = Sheets(i).Cells(currentItem + k, 4).Value + 1
- Exit For
- End If
- Next k
- Next j
- currentWorksheet = currentWorksheet + 1
- Next i
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement