0

trying to filter and copy visible cells over to a new sheet for excel couldn't find anything that might work at this stage.

Any help would be grateful

Sheets("Sheet1").Select
    ActiveSheet.Range("$A$2:$Y$295").AutoFilter Field:=25, Criteria1:=Array( _
        "Friday", "Thursday", "Tuesday", "Wednesday", "Monday"), Operator:=xlFilterValues
    
    Columns(24).Cells.SpecialCells(xlCellTypeVisible).Cells(3).Select
    ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-21],'Weekday-Rate'!R3C3:R38C4,2,FALSE)"
    
 
    Worksheets("Sheet1").Range("X3:X").SpecialCells(xlCellTypeVisible).FillDown
   
    Selection.SpecialCells(xlCellTypeVisible).Select
    Range("V14").Select
    Selection.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    Sheets("Weekday").Select
    Range("A1").Select
    ActiveSheet.Paste
    Sheets("Sheet1").Select
    Application.CutCopyMode = False
  • 1
    You might benefit from reading [How to avoid using Select in Excel VBA](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba). Please include example data in your question and how the desired result would look like. See [mcve]. – Pᴇʜ Jun 02 '21 at 09:18
  • 1
    Does this answer your question? [Copy/Paste/Calculate Visible Cells from One Column of a Filtered Table](https://stackoverflow.com/questions/17531128/copy-paste-calculate-visible-cells-from-one-column-of-a-filtered-table) – Samuel Everson Jun 02 '21 at 11:01
  • Sorry very new here how do I attach a CSV file? – Jorge Ho Jun 02 '21 at 23:32
  • @JorgeHo Sorry you cannot add files. You can paste some data and format (see [help]) it as a table or you can paste screenshots. – Pᴇʜ Jun 04 '21 at 08:49

0 Answers0