Good
I added some comments to the code and a few explanations via screen clips to the slides
Feel free to come back
On the subject on comments ....
this is just my personal style / opinion / way of doing things
1. IMVHO a comment should provide information about why something is being done, and not just a free form English repeat of the code
2. I like to avoid 'magic numbers', e.g. 0.06 ("where did THAT come from) and use meaningful Const's and variables, Const SaleTaxRate = 0.06
This is an Excel example
Option Explicit
Sub NotGoodComments()
'define variables
Dim i As Long
'go from 4 to a long way down
For i = 4 To 10000
'Multiply inputs to get outputs
Cells(i, 3) = Cells(i, 4) * Cells(i, 5)
'if col B is empty
If Cells(i + 1, 2) = "" Then
'get out
GoTo Done
End If
'get another row
Next i
Done:
' blah blah blah
End Sub
Sub BetterComments()
Const rowStartOfRealData As Long = 4
Const colSalePerson As Long = 2
Const colSales As Long = 3
Const colQty As Long = 4
Const colUnitCost As Long = 5
Dim rowData As Long
'go down all sales persons until there are no more
For rowData = rowStartOfRealData To Cells(rowStartOfRealData, colSalePerson).End(xlDown).Row
'if there is no sales person in this row, we finished
If Cells(rowData + 1, colSalePerson) = "" Then Exit For
'Sales = Qty x Cost
Cells(rowData, colSales) = Cells(rowData, colQty) * Cells(rowData, colUnitCost)
Next rowData
' blah blah blah
End Sub