ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro/VBA for filtering unique entries and pasting in another sheet (https://www.excelbanter.com/excel-discussion-misc-queries/168218-macro-vba-filtering-unique-entries-pasting-another-sheet.html)

[email protected]

Macro/VBA for filtering unique entries and pasting in another sheet
 
Hi,
Been scratching my head on this one since morning so would be a
treat if anyone drops a hint! I have a sheet with row headers say
(Task, Responsible, Due Date). I want to create a macro that:
1. Filters the list as per today's date
2. Select each person's tasks that show up
3. Paste the tasks in a separate sheet per person

It works for a small list of 5 people, BUT
The problem is that when you have a long list with around 50 names,
then its tough to record a macro for each person individually. Is
there a way for it to intelligently see how many people's names come
up as per step 1 above and then select each person's tasks to paste in
another sheet?

-wally (with a scratch mark on head of course)

Don Guillett

Macro/VBA for filtering unique entries and pasting in another sheet
 

As always, post YOUR coding efforts for comments/suggestions. You could
probably use a
for each person in people (where people is a range with the list)
do stuff (criteria1 change for each person)
copy to person sheet
next person

But, do you really need to do this when you can filter or use a pivot table.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
Hi,
Been scratching my head on this one since morning so would be a
treat if anyone drops a hint! I have a sheet with row headers say
(Task, Responsible, Due Date). I want to create a macro that:
1. Filters the list as per today's date
2. Select each person's tasks that show up
3. Paste the tasks in a separate sheet per person

It works for a small list of 5 people, BUT
The problem is that when you have a long list with around 50 names,
then its tough to record a macro for each person individually. Is
there a way for it to intelligently see how many people's names come
up as per step 1 above and then select each person's tasks to paste in
another sheet?

-wally (with a scratch mark on head of course)




All times are GMT +1. The time now is 02:31 PM.

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