I've got a sheet whose structure isn't the best, but that I c can't change without causing ripples that break lots of other stuff. In one area, several items from various categories are listed, and I need to sort those out and use their locations in another page to get some descriptive data. Unfortunately, the categories the objects fall in aren't defined in a central spot.
For example, if the data is
Animals
Type Name
Dog Fido
Dog Spot
Cat Sprinkles
Cat Tom
Dog Spike
Horse Mr. Ed
Mammal Bossie
Horse Flicka
Mammal Top Cat
Mammal Squeakers
It wouldn't be a problem except for those pesky mammals, which are defined in another sheet as being cats, dogs, or horses. For instance:
Name Type Color Etc.
Fido Dog Brown
Spot Dog white
Sprinkles Cat Blue
Tom Cat Grey
Spike Dog Grey
Mr. Ed Horse Brown
Bossie Horse Black
Crackers Bird Green*
Flicka Horse Orange
Top Cat Cat Orange
Squeakers Dog Brown
* I can't just use the full table, because there are a lot of rows I don't want to pick up, like this one.
I need to somehow convert that data into a single sheet listing cats, dogs, and horses along with their other traits like color. I had the idea of adding another column to the first table which would tell the animal's actual type (pulled via lookup from the third table). Then I'd use that row to grab the animals one at a time. For instance:
Type Name Final Type
Dog Fido LOOKUP(Animals, Fido)
Dog Spot LOOKUP(Animals, Spot
Cat Sprinkles LOOKUP(Animals, Sprinkles)
Cat Tom LOOKUP(Animals, Tom)
Dog Spike LOOKUP(Animals, Spike)
Horse Mr. Ed LOOKUP(Animals, Mr. Ed)
Mammal Bossie LOOKUP(Animals, Bossie)
Horse Flicka LOOKUP(Animals, Flicka)
Mammal Top Cat LOOKUP(Animals, Top Cat)
Mammal Squeakers LOOKUP(Animals, Squeakers)
I could then use that column to construct my subsets.
Dogs
find first(type=dog, start:end) last row = row it was found on
find first(type=dog, last row) last row
find first(type=dog, last row) last row
find first(type=dog, last row) last row
Until I've exhausted the possibilities (there will never be more than 15 dogs, so I can just search 15 times and leave blanks where needbe.
Unfortunately, the distinction between vlookup, hlookup, match, and index has me unsure which to use where.
Any help would be greatly appreciated.
Bookmarks