arsentievalex
New Member
- Joined
- Mar 18, 2020
- Messages
- 15
- Office Version
- 365
- Platform
- Windows
Hi Guys,
Hope you could help with this piece of code. I want to filter data by value and select using Ctrl right + Ctrl down to further paste in into an email. However, something seems to be off with the below code:
count_row = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlDown)))
count_col = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlToRight)))
Set table3 = Sheets("Sheet1").Range("A1").AutoFilter Field:=2, Criteria1:= _"Grocery", Range(Sheets("Sheet1").Cells(1, 1), Sheets("Sheet1").Cells(count_row, count_col))
It says the issue with Field:=2 part but I don't know how to fix it.
Thanks in advance for your help
Hope you could help with this piece of code. I want to filter data by value and select using Ctrl right + Ctrl down to further paste in into an email. However, something seems to be off with the below code:
count_row = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlDown)))
count_col = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlToRight)))
Set table3 = Sheets("Sheet1").Range("A1").AutoFilter Field:=2, Criteria1:= _"Grocery", Range(Sheets("Sheet1").Cells(1, 1), Sheets("Sheet1").Cells(count_row, count_col))
It says the issue with Field:=2 part but I don't know how to fix it.
Thanks in advance for your help