lookup function (think of a book index). need to fill based on what is in the these fields array...

Post on 29-Jan-2016

213 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lookup Function(Think of a Book Index)

Need to fill based on what is in the

these fieldsArray table.

It can make it easer to assign a name to the table where you will be getting your info.

Select the cells containing the information. Include the key (e.g. A, B, C but don’t include the headings (e.g. Category, Trade, Retail, Duty)

Select the cells containing the information. Include the key (e.g. A, B, C but don’t include the headings (e.g. Category, Trade, Retail, Duty)

We can associate a name with the selected range by typing a name in the cell reference. (See top left)

Structure of Lookup Function

=hlookup(lookup_value,table_array,row_index_num)(Horizontal lookup where the key is at the top)Or=vlookup(lookup_value,table_array,row_index_num)(Vertical lookup where the key is at the side)

Inside the () of a Lookup lookup_value,table_array,row_index_nu

mThink of the 3 parts inside the () as follows: What you are looking for (The Key) Where you are looking it up (The Range

or Area) What do you want to bring back (The

Appropriate Row or Column index)

The first use of lookup in this example is for Cell C6. We need to find out the Trade % in cells B14-D14 that is associated with the code in B6. (In this case 13%)

What are we looking up (B6 which contains B)

What are we looking up (C6 which contains B) Where are we looking it up (In the area we have named Array)

What are we looking up (C6 which contains B) Where are we looking it up (In the area we have named Array) What do we want to bring back (The info in the 2nd Row (Trade) which is 13%)

=hlookup(B6,Array,2)

top related