Hi Guys,
Looking for help cleaning up my VBA code. I have recorded and refined it to the point where everything is working beautifully. However, I would like to refine it so the code works with the sheets rather than selecting worksheets and cells directly. Would appreciate any pointers on how I can do this...
Here is my current code:
' Copy paste unfiltered IRESS data from IRESS stock to IRESS options
Sheets("IRESS Stock").Select
Range("A3").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("IRESS Options").Select
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' Autofilter IRESS stock & IRESS options
Sheets("IRESS Stock").Select
ActiveSheet.ListObjects("Table6").Range.AutoFilter Field:=1, Criteria1:= _
"=???", Operator:=xlAnd
Sheets("IRESS Options").Select
ActiveSheet.ListObjects("Table7").Range.AutoFilter Field:=1, Criteria1:= _
"=??????", Operator:=xlAnd
In regards to the first section of code, I have managed to find out that using the "With Worksheets("")" would be the first change but I am unsure how I would go about changing the Range("A3").Select & Range(Selection, Selection.End(xlToRight)) lines.
In the second section I am unsure how to do it with auto filter.
Any advice much appreciated.
Thx
Bookmarks