Advance Filters And Macros

mohitspamz

New Member
Joined
Feb 25, 2009
Messages
29
Dear All,
Its been a while since I joined this forum, and let me take this opportunity to thank you all for sharing your problems and others their solutions so ppl like me could read up and find my way out of my own petty problems by just browsing randomly! ;)

Sadly that dream run ends here as i was not able to find a way out of this one yet... hope u guys would help me on this one...

I've made a worksheet where i take in daily reports given to me by my co-workers over phone (i know kinda primitive, but theres no way around it right now, lack of infrastructure)
On the other hand i need to give them feedback on the status of their day's work.

For that i first need to remove all filters, enter data they give me over phone, and again put in place a particular set of filters to give a feedback to the person over phone. My problem is placing and removing the same set of filters for each call for a particular day (dates keep changing each day)

Col A
Data-Expected Date
(Filter-Less than or Equal to today's date)

Col B
Data-Destination
(Filter-Not Equal to "Arrived")

Col C
Data-Vehicle No.
(Filter-Non Blank)

My questions:
1. Can i create a macro to set these filter conditions to my worksheet and then another macro to remove these filters?
2. How do i filter Col A by using [Today()] function if i can record the macro, I cant manually write commands n create a macro.

Regards
Mohit
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Code:
    With Columns("A:C")
    
        .AutoFilter
        .AutoFilter field:=1, Criteria1:="<" & CLng(Date)
        .AutoFilter field:=2, Criteria1:="<>Arrived"
        .AutoFilter field:=3, Criteria1:="<>"
    End With
 
Upvote 0

Forum statistics

Threads
1,214,660
Messages
6,120,787
Members
448,994
Latest member
rohitsomani

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