====================================================
¼gªk (¤@)
Private Sub CommandButton12_Click()
Dim j,AA as integer
Sheets("Status B Log").Activate
For j = 6 To Range("A65536").End(xlUp).Row
If Cells(j, "D") <> "" Then
AA = Cells(j, "T") - Cells(j, "AI")
Cells(j, "AN") = Application.WorksheetFunction.Round(AA, 2)
Else
Cells(j, "AN") = ""
End If
Next j
ThisWorkbook.Save
MsgBox (" Quoted vs Invoice ( Variance ) - OK !")
End Sub
------------
¼gªk (¤G)
Private Sub CommandButton12_Click()
Dim i As Integer
Sheets("Status B Log").Activate
For i = 6 To Range("D65536").End(xlUp).Row
Cells(i, "AN").FormulaR1C1 = "=IF(RC[-36]<>"""",RC[-20]-RC[-5],"""")"
Cells(i, "AN") = Round(Cells(i, "AN").Value, 2)
Next i
ThisWorkbook.Save
MsgBox (" Quoted vs Invoice ( Variance ) - OK !")
End Sub§@ªÌ: GBKEE ®É¶¡: 2011-7-18 17:47