ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dropdown (https://www.excelbanter.com/excel-programming/350702-dropdown.html)

praveen_khm[_11_]

Dropdown
 

Hey all,

I had previously posted this question but it seemed confusing to all.
So, I have broke up the question and this is my first query.

1. I need to create a macro. While recording it, I use filter to a
column which contains date (dd-mmm-yyyy). Now, who do I select the
present date from the list in the drop down? Suppose I click or use the
arrow keys for 17th January 2006. Tomorrow, when I enter a new data into
this, it should stand and select 18th January 2006 in the dropdown,
which is not happening. So is there any procedure wherein I can select
the present date in the drop down.
Help is appreciated. :)

Thanks,
Pravi


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=502249


Tim Williams

Dropdown
 
Can you show your current code which sets the filter?

Tim

--
Tim Williams
Palo Alto, CA


"praveen_khm"
wrote in message
...

Hey all,

I had previously posted this question but it seemed confusing to all.
So, I have broke up the question and this is my first query.

1. I need to create a macro. While recording it, I use filter to a
column which contains date (dd-mmm-yyyy). Now, who do I select the
present date from the list in the drop down? Suppose I click or use the
arrow keys for 17th January 2006. Tomorrow, when I enter a new data into
this, it should stand and select 18th January 2006 in the dropdown,
which is not happening. So is there any procedure wherein I can select
the present date in the drop down.
Help is appreciated. :)

Thanks,
Pravi


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile:

http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=502249




praveen_khm[_12_]

Dropdown
 

Tim,
The code I use for the filter is given below. Here, in the criteria, it
shows 17-Jan-2006. I want something which can make the criteria as the
present day. Please help
Your quick help is appreciated.

Sub pravi()
Range("A3").Select
Selection.AutoFilter
Range("I3").Select
Selection.AutoFilter Field:=9, Criteria1:="17-Jan-2006"
Range("A1").Select
End Sub

Thanks.


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=502249


praveen_khm[_13_]

Dropdown
 

Tim,
The code I use for the filter is given below. Here, in the criteria, it
shows 17-Jan-2006. I want something which can make the criteria as the
present day. Please help
Your quick help is appreciated.

Sub pravi()
Range("A3").Select
Selection.AutoFilter
Range("I3").Select
Selection.AutoFilter Field:=9, Criteria1:="17-Jan-2006"
Range("A1").Select
End Sub

Thanks.


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=502249


praveen_khm[_14_]

Dropdown
 

Tim,
The code I use for the filter is given below. Here, in the criteria, it
shows 17-Jan-2006. I want something which can make the criteria as the
present day. Please help
Your quick help is appreciated.

Sub pravi()
Range("A3").Select
Selection.AutoFilter
Range("I3").Select
Selection.AutoFilter Field:=9, Criteria1:="17-Jan-2006"
Range("A1").Select
End Sub

Thanks.


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=502249


Tim Williams

Dropdown
 
Try something like

Selection.AutoFilter Field:=9, Criteria1:= Format(Now(), "dd-mmm-yyyy")

--
Tim Williams
Palo Alto, CA


"praveen_khm"
wrote in message
...

Tim,
The code I use for the filter is given below. Here, in the criteria, it
shows 17-Jan-2006. I want something which can make the criteria as the
present day. Please help
Your quick help is appreciated.

Sub pravi()
Range("A3").Select
Selection.AutoFilter
Range("I3").Select
Range("A1").Select
End Sub

Thanks.


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile:

http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=502249




praveen_khm[_15_]

Dropdown
 

Thanks Tim... :)


--
praveen_khm
------------------------------------------------------------------------
praveen_khm's Profile: http://www.excelforum.com/member.php...o&userid=30364
View this thread: http://www.excelforum.com/showthread...hreadid=502249



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com