PDA

View Full Version : data of pending transactions



Klartigue
10-19-2011, 08:58 AM
I have a spreadsheet that tracks trades that contain settlement dates located in column E. If the settlement day is anything from today and on, that means the account still has a pending transaction. I would like to write a macro that tracks all the accounts with pending transactions. I will manually put the transactions in each day, but i want the macro to update everyday so i only have a list of pending transactions. Therefore, after the settlement date has passed, i would like that transaction (or row) to be taken off the sheet and deleted.

Any ideas?

Thanks!

mdmackillop
10-19-2011, 01:57 PM
Option Explicit
Sub Pending()

Dim Rw As Long, i As Long
Rw = Cells(Rows.Count, 5).End(xlUp).Row
For i = Rw To 1 Step -1
If Cells(i, 5) < Date Then
'Test
Cells(i, 6) = "Pending"
'Delete rows
'Cells(i, 5).EntireRow.Delete
End If
Next
End Sub