The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Test
By Guest on 1st September 2021 03:23:51 AM | Syntax: VB | Views: 36



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. Option Explicit
  2. Sub Copy_Visible_Cells_Only()
  3.     'Select only the visible cells in active sheet
  4.    'Code from Officetricks.com website.
  5.    Cells.Select
  6.     Selection.SpecialCells(xlCellTypeVisible).Select
  7.  
  8.     'Since only the visible cells are selected. Only they are copied and pasted to target cell
  9.    Selection.Copy
  10.     Sheets("Sheet2").Select
  11.     ActiveSheet.Paste
  12. End Sub



  • Recent Pastes