#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Autofilter

Using "CLng(Range("V1").Value)" in VBA I end up with 19/11/06 in the custom
box, when the actual date is 26/11. Field formatted dd/mm/yyyy. Just want to
autofilter on "Today" using a macro/VBA code. All ideas appreciated.
Grid
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Autofilter

Hi Grid

autofilter on "Today" using a macro/VBA code


Try this for column A

Columns("A").AutoFilter Field:=1, Criteria1:="=" & DateSerial(Year(Date), Month(Date), Day(Date))


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Using "CLng(Range("V1").Value)" in VBA I end up with 19/11/06 in the custom
box, when the actual date is 26/11. Field formatted dd/mm/yyyy. Just want to
autofilter on "Today" using a macro/VBA code. All ideas appreciated.
Grid

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Autofilter

Thanks Ron, it works great, but is there a way to continue the macro without
having to open the Custom autofilter box and click OK?
Grid

"Ron de Bruin" wrote:

Hi Grid

autofilter on "Today" using a macro/VBA code


Try this for column A

Columns("A").AutoFilter Field:=1, Criteria1:="=" & DateSerial(Year(Date), Month(Date), Day(Date))


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Using "CLng(Range("V1").Value)" in VBA I end up with 19/11/06 in the custom
box, when the actual date is 26/11. Field formatted dd/mm/yyyy. Just want to
autofilter on "Today" using a macro/VBA code. All ideas appreciated.
Grid


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Autofilter



"Grid" wrote:

Success! Thanks very much your assistance Ron, it is greatly appreciated.
Grid

"Ron de Bruin" wrote:

Hi Grid

autofilter on "Today" using a macro/VBA code


Try this for column A

Columns("A").AutoFilter Field:=1, Criteria1:="=" & DateSerial(Year(Date), Month(Date), Day(Date))


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Using "CLng(Range("V1").Value)" in VBA I end up with 19/11/06 in the custom
box, when the actual date is 26/11. Field formatted dd/mm/yyyy. Just want to
autofilter on "Today" using a macro/VBA code. All ideas appreciated.
Grid


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Autofilter

Ignore previous please Ron, put CLng in and it works fine. Thanks for your
patience.
Grid

"Grid" wrote:

Thanks Ron, it works great, but is there a way to continue the macro without
having to open the Custom autofilter box and click OK?
Grid

"Ron de Bruin" wrote:

Hi Grid

autofilter on "Today" using a macro/VBA code


Try this for column A

Columns("A").AutoFilter Field:=1, Criteria1:="=" & DateSerial(Year(Date), Month(Date), Day(Date))


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Using "CLng(Range("V1").Value)" in VBA I end up with 19/11/06 in the custom
box, when the actual date is 26/11. Field formatted dd/mm/yyyy. Just want to
autofilter on "Today" using a macro/VBA code. All ideas appreciated.
Grid




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Autofilter

No need to open the Custom autofilter box ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Thanks Ron, it works great, but is there a way to continue the macro without
having to open the Custom autofilter box and click OK?
Grid

"Ron de Bruin" wrote:

Hi Grid

autofilter on "Today" using a macro/VBA code


Try this for column A

Columns("A").AutoFilter Field:=1, Criteria1:="=" & DateSerial(Year(Date), Month(Date), Day(Date))


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Using "CLng(Range("V1").Value)" in VBA I end up with 19/11/06 in the custom
box, when the actual date is 26/11. Field formatted dd/mm/yyyy. Just want to
autofilter on "Today" using a macro/VBA code. All ideas appreciated.
Grid


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Autofilter

No Ron, runs all the way through perfectly. I just put CLng in to give:
Columns("h").AutoFilter Field:=8, Criteria1:="<" &
CLng(DateSerial(Year(Date), Month(Date), Day(Date)))
Thanks again Ron. Hopefully the above will help someone else out.
Grid

"Ron de Bruin" wrote:

No need to open the Custom autofilter box ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Thanks Ron, it works great, but is there a way to continue the macro without
having to open the Custom autofilter box and click OK?
Grid

"Ron de Bruin" wrote:

Hi Grid

autofilter on "Today" using a macro/VBA code

Try this for column A

Columns("A").AutoFilter Field:=1, Criteria1:="=" & DateSerial(Year(Date), Month(Date), Day(Date))


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grid" wrote in message ...
Using "CLng(Range("V1").Value)" in VBA I end up with 19/11/06 in the custom
box, when the actual date is 26/11. Field formatted dd/mm/yyyy. Just want to
autofilter on "Today" using a macro/VBA code. All ideas appreciated.
Grid


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 using the contents of a particular cell mathew Excel Discussion (Misc queries) 8 September 12th 06 10:43 PM
Applying an AutoFilter to a string Hardip Excel Discussion (Misc queries) 3 April 16th 06 05:32 PM
How to Sort within AutoFilter with Protection on (and AutoFilter . giblon Excel Discussion (Misc queries) 1 February 16th 06 12:23 PM
Autofilter not working correctly... Emily Excel Discussion (Misc queries) 0 January 11th 06 10:37 PM
Strange Results with Autofilter Joyce Excel Discussion (Misc queries) 1 January 17th 05 02:42 AM


All times are GMT +1. The time now is 10:42 AM.

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"