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: 14
Default Filtering and removing rows

Hi,

I have built a macro that filters my sheet; I then want to remove
these rows leaving no spaces and only the rows with remaining
criteria.

I can do all this, no problem. The problem occurs when the rows
change, as this is a variable set of data.

When I send the excel to the cell one below A1, while filtered, it
always returns a reference. i.e. below on line 5.

I need this to be variable.

Can anyone please help a man on the brink of tears......?

Thank you in advance


' Sub removing_split_Rate()

Sheets("Invoice Detail").Select
Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=26, Criteria1:="Split"
Range("A92").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A575").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
Selection.AutoFilter Field:=26
Range(Selection, Selection.End(xlUp)).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Range("A1").Select
Selection.End(xlUp).Select
Range("A2").Select
Sheets("Invoice Detail - Split").Select
Range("A2").Select
Selection.AutoFilter
Selection.AutoFilter Field:=26, Criteria1:="17.5"
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter Field:=26, Criteria1:="5"
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("AA40").Select
Selection.AutoFilter Field:=26
Range("A2").Select
Selection.End(xlToLeft).Select
Selection.AutoFilter
Sheets("Invoice Detail").Select
Selection.AutoFilter

 
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
Sorting or filtering the rows Amey Excel Discussion (Misc queries) 1 December 28th 09 11:16 AM
How do I Copy and Paste onto Same Rows after filtering out rows. TWT Excel Discussion (Misc queries) 2 October 20th 08 04:09 PM
Filtering Rows ? LucaBrasi Excel Worksheet Functions 4 December 1st 06 10:24 PM
Removing (deleting, filtering) lines in a pattern . . . Wayne Knazek Excel Discussion (Misc queries) 6 July 26th 06 08:49 PM
Removing Empty Rows and selecting Specific Rows Jetheat[_8_] Excel Programming 7 August 12th 05 12:10 AM


All times are GMT +1. The time now is 02:51 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"