I have a worksheet with all of my entries, called "all" (sheet 2):
Column A: date
Column B: Pymt (such as "Amex", "Visa" or a number for a check, etc)
Column C: Amount
Column D: Vendor
Column E: Notes
Column F: Job
Column G: Category (such as "Commissions", "Materials" etc)
I would like sheet 4, called "Amex" to automatically populate rows A:G with column B payments that are Amex, as I add them to "all" throughout the year. (As well as the other pymt types on their respective sheets)
I have used a database in the past to accomplish this, but I have a bad "delete" trigger finger and want to avoid databases. You can only protect-lock the delete/insert rows and columns, not cells. I found this VB script somewhere else, but I must not understand it because it didn't workThe sample was for someone else's worksheet, but I only changed my sheet and range names. Could someone help me out?
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("B:B")) Is Nothing Then Exit Sub
If Target.Value = "Amex" Then
Range(Range("A" & Target.Row), Range("G" & Target.Row)).Copy _
Sheets("Amex").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End If
End Sub
Bookmarks