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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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,224,828
Messages
6,181,209
Members
453,022
Latest member
RobertV1609

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