-
data of pending transactions
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!
-
[VBA]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[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules