+ Reply to Thread
Results 1 to 4 of 4

I can't find anyone who can solve this for me

  1. #1
    Registered User
    Join Date
    04-20-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    I can't find anyone who can solve this for me

    I have a real dilemma. I have two worksheets. Worksheet #1 which is named “Animals” and Worksheet#2 named “FilterCriteria”. What I am trying to do is write a macro which will start with the first entry in the FilterCriteria worksheet (Goldfish) and load that as the filter criteria. Then go to the Animal worksheet and find all of the cells under the “Animal” column and if the cell equals the filter criteria (Goldfish) then the value under the species column on the Animal worksheet needs to be changed to the species from the FilterCriteria worksheet. So if cell equals the filter criteria (Goldfish) then the value under the species column on the Animal worksheet equals “Fish”. So in the example below it should find 3 entries and there should be “fish” under the species columns on those rows. Then the macro will load the next filter criteria in the FilterCriteria worksheet (Herring) and load that as the filter criteria. Then go to the Animal worksheet and find all of the cells under the “Animal” column and if the cell equals the filter criteria (Herring) then the value under the species column on the Animal worksheet needs to be changed to the species from the FilterCriteria worksheet. So if cell equals the filter criteria (Herring) then the value under the species column on the Animal worksheet equals “Fish”. So in the example below it should find 1 entries and there should be “fish” under the species columns on those rows. And so forth until the end of the filter criteria list is reached at that point the macro terminates. The catch is the fiter criteria list on the FilterCriteria worksheet needs to be dynamic so that entries can be added or removed. I have tried several different means of achieving this but have met with no success. Can anybody help me?

    Worksheet #1 Name: Animals

    Animal Species
    Goldfish
    Black Widow
    Herring
    Finch
    Zebra
    Cow
    Tiger
    Lizard
    Snake
    Kangaroo
    Goldfish
    Herring
    Polar Bear
    Black Bear
    Bobcat
    Alligator
    Shark
    Whale
    Monkey
    Ape
    Turtle
    Shark
    Goldfish
    Bass
    Carp

    Worksheet #2 Name: FilterCritia

    Animal Species
    Goldfish Fish
    Herring Fish
    Tiger Mammal
    Lizard Reptile
    Kangaroo Mammal
    Peacock Bird
    Black Bear Mammal
    Bobcat Mammal
    Shark Mammal
    Ape Mammal
    Turtle Reptile
    Bass Fish
    Carp Fish
    Trout Fish

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: I can't find anyone who can solve this for me

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.


    Also,

    I am pretty sure I saw this question in another forum or somewhere in this forum.

    Duplicate posts are not allowed... and crossposting is not preferred... but must be accompanied with links to crossposts if you do.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: I can't find anyone who can solve this for me

    I tried to understand what you're looking for by reading your post, but I don't quite grasp it.

    I sense you have a pretty good idea about what you want to achieve but fail to express it in a simple way so that we can understand and help.

    I suggest you upload your workbook (or an example) with comments in it on what you want to do.
    even an example-macro that you've tried out but doesn't exactly do what you want to, but parts of it, would help - as we could itterate through the code and improve it.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: I can't find anyone who can solve this for me

    wamp,

    please don't ignore requests for OP to obide by forum rules.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1