Hi Mikey,
You may infer that VLOOKUP will 'pull a full subset', but VLOOKUP does not imply that it will do so (and is incapable of inferring anything). My own inference would be that since VLOOKUP is going to return a value to a single cell, it will return only a single value, and that value will be the one corresponding to the first instance of the search value that is found.
Barry, I stand corrected. I should have said that I inferred the existence of a full subset, but not knowing the internal scheme for how Numbers finds data in a table, it is not unreasonable to suppose that there is always an implication (not inferrence, wrong choice of words) of a full subset, even if that full subset is one item (or record in this instance).
Your inference seems reasonable, or at least consistent with my experience. I just want to know why Numbers appears to be VLOOKing from the bottom up, and if there's an elegant (or even existent) way to subvert this.
"First" depends on direction of search For LOOKUP, and for VLOOKUP with a 'close-match' that direction is from bottom to top of the search-range. Ronnie's experience has determined that an 'exact-match' setting appears to reverse the direction of search appears true in my brief tests, so using that setting would appear to match your desire regarding defining 'first' to mean 'instance closest to row 1.'
Yes, this issue of direction is my point of concern. Why from the bottom to the top? Perhaps it was an arbitrary choice on the part of the programmers, perhaps there is some logical reasoning or protocol that all spreadsheet or database apps follow that I"m just not privy to. I thought briefly of the 'exact-match' setting, but couldn't deduce why that would return any different result. Seems it might have to do with some sorting factor in a field NOT involved in the VLOOKUP, though I'm not sure I'm mentally ready to tackle that possibility... đ
Another choice would be to use MATCH and OFFSET in place of VLOOKUP. MATCH appears to also change its direction of search with changes in the final argument, match-type, as can be seen in the results below. The formulas in Summary::B and C, and in Summary::D, E and F are the same except for the match-type set in the VLOOKUP or MATCH function (indicated by the number at the end of the column label).
Summary::B2: =VLOOKUP($A2,Data :: $A:$B,2,)
(omitted=TRUEâclose-match, shown in label as "1", FALSEâexact-match, shown in label as "0")
This looks promising. I may experiment with this.
Summary::D2: =OFFSET(Data::$A$1,MATCH($A,Data :: $A,1)-1,1)
But your post implies that a single instance is not what you want to return in your summary table. Perhaps a more complete specification of the results you are looking for would help determin a solution to the actual issue.
Regards,
Barry
Actually, it is a single instance for each date. Here's my scenario:
My church has two children's choirs (differentiating on age/development). I'm producing a "homebrew" curriculum for teaching music to these kids, and I'm using a lot of the same educational assets (though using them differently to respect the age/development distictions). I was basically creating an overview table that had two rows for each date: one for one group, the next for the other group. Admittedly, the more correct method would have been to use one row for both groups, and just distinguish the data pulled in my report tables on another sheet, but I was hoping to be clever and not have fool with a table that would've needed three monitors to display the whole record at once.
Anyway, this isn't the first time I've had this crisis. I have another table in a different spreadsheet that is having "dating problems," so your suggestions here are making me think of looking at that monster again...
PS: "instatiated"? Mistyped? What word was intended?
How embarrassing. I can't even spell a silly word like "instantiated" correctly. Either that, or I couldn't spell correctly that I wasn't hungry (insatiated). I don't know, I apparently wasn't communicating very well on a number of points. It was pretty late last night... đ