Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofilter using the contents of a particular cell | Excel Discussion (Misc queries) | |||
Applying an AutoFilter to a string | Excel Discussion (Misc queries) | |||
How to Sort within AutoFilter with Protection on (and AutoFilter . | Excel Discussion (Misc queries) | |||
Autofilter not working correctly... | Excel Discussion (Misc queries) | |||
Strange Results with Autofilter | Excel Discussion (Misc queries) |