Please help me guys : ) : )

Status
Not open for further replies.

yeongkwe

New Member
Joined
Dec 13, 2016
Messages
13
Hi, someone can kindly help me to solve this issue. I use the VBA code to filter the dates. I did some changes on the code, can anyone tell me did I do anything wrong? Because after I modify it, the search got no result coming out. Please kindly soul help me, and your help will be very much appreciated. Thanks you.

Sub Macro1()

abcd = Worksheets("sheet1").Cells(1, 101)
Range("A38:E38").Select
Selection.AutoFilter
ActiveSheet.Range("$A$38:$E$97375").AutoFilter Field:=5, Criteria1:= _"<15/08/2016", Operator:=xlAnd
" End Sub


Below is original code before I modify.

Sub Macro1()
'
' Macro1 Macro
' w
'
' Keyboard Shortcut: Ctrl+w
'

Range("A38:E38").Select
Selection.AutoFilter
ActiveSheet.Range("$A$38:$E$97375").AutoFilter Field:=5, Criteria1:= _
"<15/08/2016", Operator:=xlAnd
End Sub
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Code:
[COLOR=#333333]Sub Macro1()[/COLOR]
[COLOR=#333333]abcd = Worksheets("sheet1").Cells(1, 101)[/COLOR]
[COLOR=#333333]ActiveSheet.Range("$A$38:$E$97375").AutoFilter Field:=5, Criteria1:= "<15/08/2016", Operator:=xlAnd[/COLOR]
[COLOR=#333333]End Sub[/COLOR]

why abcd?
sometimes you had to change dd/mm to mm/dd
 
Upvote 0
@yeongkwe, which of the 2 threads you have going has the correct question? as in this thread you state the modified code is

ActiveSheet.Range("$A$38:$E$97375").AutoFilter Field:=5, Criteria1:= _"<15/08/2016",
and in the thread below you have it as
Code:
  ActiveSheet.Range("$A$38:$E$97375").AutoFilter Field:=5, Criteria1:= _
        "<abcd", Operator:=xlAnd


Please help me guys : )
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,216,004
Messages
6,128,223
Members
449,435
Latest member
Jahmia0616

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top