ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Looping filter criteria (https://www.excelbanter.com/excel-programming/370168-looping-filter-criteria.html)

VBA Noob[_42_]

Looping filter criteria
 

Hi all,

What's the code to loop through a Autofilter list.

e.g John, Jack , Tim

Selection.AutoFilter Field:=1, Criteria1:="John"

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=570946


Ron de Bruin

Looping filter criteria
 
Hi VBA Noob

You can create a list with advancedfilter an loop through this list
See how I use it here
http://www.rondebruin.nl/copy5.htm

Look at this one for example
http://www.rondebruin.nl/copy5.htm#all


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



"VBA Noob" wrote in message
...

Hi all,

What's the code to loop through a Autofilter list.

e.g John, Jack , Tim

Selection.AutoFilter Field:=1, Criteria1:="John"

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=570946




VBA Noob[_43_]

Looping filter criteria
 

Thanks Ron.....again

Happy Birthday by the way.



VBA Noo

--
VBA Noo
-----------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...fo&userid=3383
View this thread: http://www.excelforum.com/showthread.php?threadid=57094


VBA Noob[_44_]

Looping filter criteria
 

Hi Ron,

Can you paste both Formulas and values with advanced filter

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=570946


Ron de Bruin

Looping filter criteria
 
No, not possible

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



"VBA Noob" wrote in message
...

Hi Ron,

Can you paste both Formulas and values with advanced filter

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=570946




VBA Noob[_45_]

Looping filter criteria
 

Would I be better with a Filter then

How would I code say

Sheet3 A2 to A29 as a array of names. e.g John Davis and then loo
through all names to use as "Criteria1:" for filter.

VBA Noo

--
VBA Noo
-----------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...fo&userid=3383
View this thread: http://www.excelforum.com/showthread.php?threadid=57094


Ron de Bruin

Looping filter criteria
 
Hi VBA Noob

Also not working with AutoFilter
You must loop through the data and copy each row that have your criteria


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



"VBA Noob" wrote in message
...

Would I be better with a Filter then

How would I code say

Sheet3 A2 to A29 as a array of names. e.g John Davis and then loop
through all names to use as "Criteria1:" for filter.

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=570946




VBA Noob[_46_]

Looping filter criteria
 

Ron,

Instead of looping....wouldn't know where to start I was thinking I
could insert a column at T to break the current region. Columns T
onwards has the formulas

Then use a template with my formulas to paste into.

My question then is how would I adpat your code to copy the template
then paste into the copy e.g Template (2)

Thanks for staying with this one for me.

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=570946


Ron de Bruin

Looping filter criteria
 
Post a example for you today

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



"VBA Noob" wrote in message
...

Ron,

Instead of looping....wouldn't know where to start I was thinking I
could insert a column at T to break the current region. Columns T
onwards has the formulas

Then use a template with my formulas to paste into.

My question then is how would I adpat your code to copy the template
then paste into the copy e.g Template (2)

Thanks for staying with this one for me.

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=570946





All times are GMT +1. The time now is 12:00 AM.

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