Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Autofilter 0,00 doesn't work in MACRO

Hi,
I have a database saved from SAP to Excel and want to perform following w/
the data:
1. Filter out all lines with 0,00 in 2 columns
2. Delete them
3. Turn off Autofilter, ie. show all the rest and sort acc. Date (format:
01.01.2009, but formatted as text)
4. Copy/paste to another xls sheet

This works perfectly if I do Autofilter manually, of course.

To save time I saved a MACRO but it doesn't filter anything, however there
are 0,00's as well as don't sort correctly, although answered YES to "Sort
anything that looks like a number as number" but sort as text (02.03.2009 <
03.01.2009)...

I read few threads about problems with autofilter as to filter dates but
never how to filter numbers correctly...

I would appreciate your help as I am absolutely new to VBA.

The current code:
Selection.AutoFilter Field:=10, Criteria1:="0,00"
Selection.AutoFilter Field:=12, Criteria1:="0,00"
Rows("2:800").Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter
Range("A1:U130").Sort Key1:=Range("I1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Columns("A:Q").Select
Selection.Copy
Windows("!s711 PROD Planning Template.xls").Activate
ActiveWindow.WindowState = xlMaximized
Sheets("s721").Select
Range("A1").Select
ActiveSheet.Paste
Reply
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
Autofilter doesn't work tombogman Excel Discussion (Misc queries) 7 January 18th 06 12:09 AM
custom autofilter does not work Max Excel Discussion (Misc queries) 2 January 13th 06 02:41 AM
Why won't it work when I use VBA to set autofilter criteria to ce. biggy Excel Programming 3 May 25th 05 03:48 PM
Autofilter(Top 10...): What does it do? How does it work? Chet Hurd Excel Discussion (Misc queries) 3 May 10th 05 08:24 PM
Help: Autofilter doesn't work Sebastian[_2_] Excel Programming 2 August 29th 03 04:37 PM


All times are GMT +1. The time now is 01:02 PM.

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"