Sie sind auf Seite 1von 2

Excel Function Dictionary 1998 - 2000 Peter Noneley A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 B C D E F G H I

LOOKUP (Array) Page 1 of 2 J

LOOKUP (Array)
Name Alan Bob Carol David Eric Francis Gail Jan 10 20 30 40 50 60 70 Feb 80 90 100 110 120 130 140 Eric 77 =LOOKUP(F12,D4:G10) Mar 97 69 45 51 77 28 73

Type a Name in this cell : The March value for this person is :

What Does It Do ? This function looks for a piece of information in a list, and then picks an item from the last cell in the adjacent row or column. It always picks the data from the end of the row or column, so it is no good if you need to pick data from part way across a list, (use VLOOKUP or HLOOKUP). The way in which the function decides whether to pick from the row or column is based on the size of the table. If the table has more rows than columns : the function will look down the left most column trying to find a match for the piece of information you asked it to look for. When a match is found, the function will look across to the right most column to pick the last entry on the row.

If the table has the same amount of rows and columns : the function will look down the left most column and work in just the same way as if the table had more rows than columns, as in the description above. If the table has more columns than rows : the function will look across the top row trying to find a match for the piece of information you have asked it to look for. When a match is found, the function will then look down to the bottom cell of the column to pick the last entry of the column.

Syntax =LOOKUP(WhatToLookFor,RangeToLookIn) The WhatToLookFor should be a single item. The RangeToLook in can be either horizontal or vertical. Be careful not to include unnecessary heading in the range as these will cause errors.

Excel Function Dictionary 1998 - 2000 Peter Noneley A 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 B C D Example 1 In this table there are more rows than columns, so the column heading of Jan is not included in the lookup range. Jan Alan 100 Bob 100 Carol 100 David 100 Eric 100 Fred 100 Formatting No special formatting is needed. E

LOOKUP (Array) Page 2 of 2 F G H I J Example 2 In this table there are more columns than rows, so the row heading of Jan is not included in the lookup range. Alan 100 Bob 100 Carol 100 David 100

Jan

Problems The list of information to be looked through must be sorted in ascending order, otherwise errors will occur, either as #N/A or incorrect results. Table 1 shows the Name column sorted alphabetically, the results of using =LOOKUP() will be correct. Table 2 shows the same data, but not sorted. Sometimes the results will be correct, but other times the result will be an #N/A error or incorrect figure. Table 1 Name Alan Bob Carol David Eric Francis Gail Name : Value : Table 2 Name David Eric Alan Bob Carol Francis Gail Name : Value :

Jan 10 20 30 40 50 60 70 Eric

Feb 80 90 100 110 120 130 140

Mar 97 69 45 51 77 28 73

Jan 40 50 10 20 30 60 70 Eric

Feb 110 120 80 90 100 130 140

Mar 51 77 97 69 45 28 73

77 =LOOKUP(C88,B80:E86)

45 =LOOKUP(H88,G80:J86)

Das könnte Ihnen auch gefallen