Documente Academic
Documente Profesional
Documente Cultură
ratioWorksheetName = "RATIO"
weightWorksheetName = "WEIGHT"
manualpointsWorksheetName = "Manual Points"
structureWorksheetName = "structure"
materialCodeStart = 4
materialCodeOffset = 2
materialCodeCountMax = 5
structureWorksheet.Rows(structureRowIndex).Offset(rowOffset).Insert
structureWorksheet.Cells(structureRowIndex + rowOffset,
4).Value = weightWorksheet.Cells(weightRowIndex,
materialTitleList(materialColumnCount)).Value
structureWorksheet.Cells(structureRowIndex + rowOffset,
5).Value = weightWorksheet.Cells(weightRowIndex,
materialTitleList(materialColumnCount)).Value
structureWorksheet.Cells(structureRowIndex + rowOffset,
10).Value = weightWorksheet.Cells(weightRowIndex, weight_ratioColumn).Value
structureWorksheet.Cells(structureRowIndex + rowOffset,
12).Value = weightWorksheet.Cells(weightRowIndex, weight_ratioColumn).Value
structureWorksheet.Cells(structureRowIndex + rowOffset,
3).Value = "00" + CStr(CInt(PartLevel) + 1)
structureWorksheet.Cells(structureRowIndex + rowOffset,
1).Value = "vq"
structureWorksheet.Cells(structureRowIndex + rowOffset,
13).Value = weightWorksheet.Cells(weightRowIndex, sub_ratioColumn).Value
structureWorksheet.Cells(structureRowIndex + rowOffset,
14).Value = weightWorksheet.Cells(weightRowIndex, co_ratioColumn).Value
structureWorksheet.Cells(structureRowIndex + rowOffset,
15).Value = structureWorksheet.Cells(structureRowIndex + 1, 14).Value *
structureWorksheet.Cells(structureRowIndex + 1, 13).Value *
structureWorksheet.Cells(structureRowIndex, 15).Value / 10000
structureWorksheet.Rows(structureRowIndex +
rowOffset).Font.Color = vbRed
End If
materialColumnCount = materialColumnCount + 1
materialColumn = materialTitleList(materialColumnCount)
If materialColumn = 0 Then Exit Do
Loop
structureRowIndex = structureRowIndex + 1
Set structureSignCell = structureWorksheet.Cells(structureRowIndex, 1)
Loop
'ThisWorkbook.Worksheets(1).Rows(3).Offset(1).Insert
'StructureFile.Close SaveChanges:=True
End If
Next
SourceFile.Close SaveChanges:=False
End Sub