LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Copying filtered rows

After I filter list I want to copy only the visible rows but with the below
code it copies the hidden rows.
also
Private Sub CommandButton1_Click() ' Analyze records

Dim c As Range
Dim ws As Worksheet
Dim iEnd As Long
Dim ws1 As Worksheet

UndoMyFilter

Set ws = Sheets("Summary")

iEnd = ws.Range("B7").End(xlDown).Row

For Each c In ws.Range("B7:B" & iEnd)
If c < ws.Range("G1") Then c.EntireRow.Hidden = True
Next c
For Each c In ws.Range("B26:B" & iEnd)
If c ws.Range("G2") Then c.EntireRow.Hidden = True
Next c
For Each c In ws.Range("B7:B" & iEnd)
If c.Offset(0, 2) < ws.Range("G3") Then c.EntireRow.Hidden = True
Next c

Application.CutCopyMode = False
Range("B6:F6").Select

Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Analyze").Select
Range("E36").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying four filtered cells CousinExcel Excel Discussion (Misc queries) 1 January 15th 10 04:14 PM
copying one column with hidden/filtered rows to another colum Rechie Excel Discussion (Misc queries) 2 September 14th 09 06:28 PM
Copying Filtered Data Shirley Munro Excel Discussion (Misc queries) 1 June 23rd 05 01:18 AM
Copying filtered data cghall55 Excel Programming 5 January 11th 05 04:14 PM
Filtered Visible Rows & VBA Non-Filtered Rows Displayed QTE[_15_] Excel Programming 8 July 11th 04 02:21 AM


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"