I'm having a little issue understanding how VBA's AutoFilter function operates. Code like this: Worksheets("my sheet") ("my sheet"). Range("A1"). When I try to replicate the first col using this bit of code, AutoFilter Field:=14, Criteria1:="my criterion" filters the worksheet in col 14 just how I want it to, but when I do:
Dim LR As Long
LR = Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("my sheet").Range("A2:A" & LR).Copy
Then, contrary to what I wanted, the first header of the first col (A1) was duplicated into my newly generated sheet. Except for the header, I want to duplicate everything that is filtered (A2 and down to the end of the filtered col).
In case there was a problem when the sheets were produced, I tried to isolate the functions that create the sheets into which I am copying the cols, but that did not resolve the problem. I did find the following line of code online:
Dim LR As Long
LR = Cells(Rows.Count, 1).End(xlUp).Row
But to my knowledge, that shouldn't be the issue, because my code does work if I run the macro again (twice), once the new sheets have been created and they have been formatted (just some text in cells A1 and B1 and some formatting of those cells).