Lookup function in Excel
On Tue, 3 Feb 2009 10:14:01 -0800, Anthony
wrote:
I have a large spreadsheet, and I am attempting to aggregate data contained
in this spreadsheet. Here is what I am trying to do: I have labels across
the top row of the spreasheet. The spreadsheet is set up like this:
ABCDEFG
1 11345
2 12145
3 12341
What I'd like to do is determine for each row, what the minimum value is,
the number of instances the minimum value is achieved, and the corresponding
value for the first row ON THE LAST OCCASION OF THE MINIMUM VALUE going from
left to right. FOr example, if the function I am trying to use were entered
correctly, it would return (for Row 1) a minimum value of 1 that is recorded
on two instances AND the final instance occurs at Column B (top row of
values). Similarly for row 3, my function would return a minimum value of 1
that is recorded on two instances AND the final instance occurs at Column E
(note that in my example above, things might not line up). In any event, any
help would be greatly appreciated.
Many thanks
Try the following formula
="("&MIN(A1:G1)&","&COUNTIF(A1:G1,MIN(A1:G1))&","& CHAR(64+MAX(COLUMN(A1:G1)*(A1:G1=MIN(A1:G1))))&")"
Note: This is an array formula that should be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.
Change the range A1:G1 to fit your data range.
The result for you sample data will be
"(1,2,B)" for row
"(1,2,C)" for row 2
"(1,2,E)" for row 3
Maybe you should consider not to have all three results in the same
formula but split it into three different formulas.
Hope this helps / Lars-Åke
|