JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
I have the code below, which only returns values for first column, not all columns.
Sheet: wTransactions
Table: tbl_Transactions in range A1:L40981
Filter range: AA1:AL2, where AA1:AL1 = A1:L1 (headers match those of tbl_Transactions)
Filter criteria: AC2, a value that exists in C1:C40981, AA2:AB2, AD2:AL2 are empty
Can anyone suggest correction to code below so it returns values across AA4:ALx (where x is count of filtered records + 3), it only returns filtered values only in AA4 and down, not AA4:AL4 and down:
I have the code below, which only returns values for first column, not all columns.
Sheet: wTransactions
Table: tbl_Transactions in range A1:L40981
Filter range: AA1:AL2, where AA1:AL1 = A1:L1 (headers match those of tbl_Transactions)
Filter criteria: AC2, a value that exists in C1:C40981, AA2:AB2, AD2:AL2 are empty
Can anyone suggest correction to code below so it returns values across AA4:ALx (where x is count of filtered records + 3), it only returns filtered values only in AA4 and down, not AA4:AL4 and down:
Code:
Sub Macro3()
With wTransactions
With .[Temp_Output]
.Offset(1).Resize(, 12).Value = ""
.Offset(1, 2).Value = UCase("Bank Charges") '[Account_User]
End With
.[tbl_Transactions[#All]].AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=.[AA1:AL2], CopyToRange:=.[AA4]
End With
End Sub