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 / Sort in VBA doesn't work

Hi, I have data saved from SAP to EXCEL and macro which should:
1. Filter 0,00 lines and delete
2. Filter Off
3. Sort the rest acc. DATE (01.02.2009 format but as text)
4. Copy all / paste all to another sheet

I am abosolutely new to macros.

I save a macro which however doesn't filter 0,00's / sort incorrectly, still
the date as text, although after asked "sort text as numbers" I answered YES.

I saw some threads about this problem but couldn't figure out the right for
me...

Thx. for any feedback.

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:U800").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
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Autofilter / Sort in VBA doesn't work

Thanks for reply.

I of course tried to search in past posts but couldn't figure out myself to
make it correctly.

Can you please recommend me some?

Anyway, I am very new in VBA and don't know the functions / commands to have
it run myself....

Any more help would be great.

Thx.

"Nigel" wrote:

see you other numerous posts on this topic.

--

Regards,
Nigel




"Richard" wrote in message
...
Hi, I have data saved from SAP to EXCEL and macro which should:
1. Filter 0,00 lines and delete
2. Filter Off
3. Sort the rest acc. DATE (01.02.2009 format but as text)
4. Copy all / paste all to another sheet

I am abosolutely new to macros.

I save a macro which however doesn't filter 0,00's / sort incorrectly,
still
the date as text, although after asked "sort text as numbers" I answered
YES.

I saw some threads about this problem but couldn't figure out the right
for
me...

Thx. for any feedback.

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:U800").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
End Sub



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 sort gator Excel Discussion (Misc queries) 1 April 22nd 09 03:14 PM
Autofilter / Sort MACRO doesn't work correctly Richard Excel Programming 0 February 9th 09 11:33 PM
Autofilter / sort doesn't work in MACRO Richard Excel Programming 0 February 9th 09 10:35 PM
How to Sort within AutoFilter with Protection on (and AutoFilter . giblon Excel Discussion (Misc queries) 1 February 16th 06 12:23 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 03:07 PM.

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

About Us

"It's about Microsoft Excel"