Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



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
Filter with criteria! ernietan Excel Discussion (Misc queries) 1 April 15th 10 09:40 AM
Macro for Looping for Criteria Checking FARAZ QURESHI Excel Discussion (Misc queries) 5 June 22nd 07 03:19 AM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
Problem with basic looping and criteria Jeff Excel Programming 2 December 29th 04 10:05 PM
multiple looping criteria hotherps[_62_] Excel Programming 2 May 30th 04 12:57 AM


All times are GMT +1. The time now is 10:11 PM.

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"