I maintain payment records, one sheet per customer. I want to be able to find the last payment made, calculate the time difference between today and the last payment made, and copy those individuals names and addresses to the last sheet named "BP". My formula works for the first sheet but after I have pasted the info from the first sheet to BP I can't see how to get back to the second sheet, third, etc. So far it goes like this:
Sub LastCell()
'
' LastCell Macro
' Macro recorded 4/27/2001 by D. McCallum
For Each sht In Workbooks("BCLS.xlw".Worksheets
Selection.SpecialCells(xlCellTypeLastCell).Select
ActiveCell.Offset(0, -254).Range("A1".Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Range("A1".Select
ActiveCell.FormulaR1C1 = "=TODAY()-R[-1]C[1]"
ActiveCell.Offset(1, 0).Range("A1".Select
If ActiveCell.FormulaR1C1 > 35 Then
Rows("9:10".Select
Range("A10".Activate
Selection.Copy
Sheets("BP".Select
Selection.Insert Shift:=xlDown
Range("A3".Select
End If
Next sht
End Sub
Eventually I would like to be able to have Word create the payment late letter for for now I just need help in getting around the sheets.
Sub LastCell()
'
' LastCell Macro
' Macro recorded 4/27/2001 by D. McCallum
For Each sht In Workbooks("BCLS.xlw".Worksheets
Selection.SpecialCells(xlCellTypeLastCell).Select
ActiveCell.Offset(0, -254).Range("A1".Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Range("A1".Select
ActiveCell.FormulaR1C1 = "=TODAY()-R[-1]C[1]"
ActiveCell.Offset(1, 0).Range("A1".Select
If ActiveCell.FormulaR1C1 > 35 Then
Rows("9:10".Select
Range("A10".Activate
Selection.Copy
Sheets("BP".Select
Selection.Insert Shift:=xlDown
Range("A3".Select
End If
Next sht
End Sub
Eventually I would like to be able to have Word create the payment late letter for for now I just need help in getting around the sheets.