apologies for the simplicity of this question
I currently use vba autofilter criteria statements to generate reports from a excel table (table length continually increases in rows, 4 distinct columns)
I just can’t find a simple command to “match” “=” “find” command to accomplish the same task if I set the excel table as an array
I guess I’m mentally stuck because either using Access report writer or vba autofilter makes the report generation simple
The only array selection methods I have found is creating array loop statements?
My desired report (resulting records matching criteria) appears as a few columns and a few rows in the resulting worksheet
i.e.
worksheet
at A1: list all the array records (4 columns) with array column 1 records matching “11”
(result will be 0 – 10 records)
at F1: list array records with array column 1 records matching “12”
(0 – 10 records)
at A10: list array records with array column 1 records matching “21”
etc
‘my current dumb table (non array) search and paste works’
With .Range("A1:D" & r)
.AutoFilter Field:=4, Criteria1:="11"
.SpecialCells(xlCellTypeVisible).Copy Destination:=Range("F1")
End With
With .Range("A1:D" & r)
.AutoFilter Field:=4, Criteria1:="12"
.SpecialCells(xlCellTypeVisible).Copy Destination:=Range("J1")
End With`
‘once I’m done searching and creating my report I delete the original data rows A1:D
‘for the expanding table of rows r’
nDancer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.