Wednesday 15 August 2012

excel - Why is AutoFilter being applied three rows before the specified range -


Autofilter applies to many worksheets from the date criteria set in the following code worksheet: '' Grand Total ''! B1, worksheet Category A6, which is formatted as a date, there are headers and formulas in 1-5 rows. But, 3-5 lines are disappearing with filtered rows started in A6. Can anyone see why? You know, everything should appear above the line A6. Thanks again for your help.

Subtitle federate ()

  Dim works as a worksheet application. Screen updating = Falls' screenworking is disabled, for each work Turn off worksheets in the active workbook if Ws.Name is activated with "Grand total" then activate W.AutoFilterMode = False Remove any existing filters Ws.Range ("A6"). AutoFilter field: = 1, Criteria1: = Range ("'Grand total'! B1 '). Text Range ("G2"). Activate Center_it 'closes the next data entry cell in the approximate center of the screen if the next sheet 1. Active range ("B2"). ClearContents range ("B1"). Internal. ColourIndex = 3 'set the color of the cell Showing filter date range ("B1"). Activate the app. Turn on screenapting = true 'screen updating   

closing sub

You are asking Autofilter to operate only on cell A6. This does not make sense, so Excel extends selection to include cells around Excel. You must specify the category on which to apply the autofilter.

No comments:

Post a Comment