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 30 31
| '===============================================================
For i = 2 To LastCol1
If cmb1.Text = Form2.xlWorksheet.Cells(1, i).Value Then
Exit For
End If
Next
For j = 2 To Form2.xlWorksheet.Cells(Form2.xlWorksheet.Rows.Count, i).End(XlDirection.xlUp).Row
Form2.xlWorksheet.Cells(j, 9).Value = textbox2.Text * Form2.xlWorksheet.Cells(j, i).Value
Next
'================================================================
For k = 2 To LastCol1
If cmb2.Text = Form2.xlWorksheet.Cells(1, k).Value Then
Exit For
End If
Next
For m = 2 To Form2.xlWorksheet.Cells(Form2.xlWorksheet.Rows.Count, k).End(XlDirection.xlUp).Row
Form2.xlWorksheet.Cells(m, 9).Value = Form2.xlWorksheet.Cells(m, 9).Value + (textbox3.Text * Form2.xlWorksheet.Cells(m, k).Value)
Next
'==================================================================
For n = 2 To LastCol1
If cmb3.Text = Form2.xlWorksheet.Cells(1, n).Value Then
Exit For
End If
Next
For p = 2 To Form2.xlWorksheet.Cells(Form2.xlWorksheet.Rows.Count, n).End(XlDirection.xlUp).Row
Form2.xlWorksheet.Cells(p, 9).Value = Form2.xlWorksheet.Cells(p, 9).Value + (textbox4.Text * Form2.xlWorksheet.Cells(p, n).Value)
Next
'================================================================== |
Partager