extracting multiple rows of data from another worksheet

J

June Chin

I have one worksheet, full of data. In another worksheet, I would like to search through the data individuals who belong to a certain group and then extract the entire row of information for that particular individual into a new worksheet. How can I achieve this using formulas?

EggHeadCafe - Software Developer Portal of Choice
Silverlight Modal Dialog With Custom User Controls
http://www.eggheadcafe.com/tutorial...01-d47cf3410feb/silverlight-modal-dialog.aspx
 
L

L. Howard Kittle

Try something like this adapted to your data, column and rows. This will
return 12 columns of data on the row of the lookup value that matches A19.

=VLOOKUP(A19,Sheet2!$A$2:$M$7,{2,3,4,5,6,7,8,9,10,11,12,13},0)

Select 12 columns in the row you want the data to be returned to. While
still selected type in the formula above. Commit with Ctrl+Shift+Enter.
You should get { } around the formula.


So...

A19 is the lookup value, probably a name.
Sheet2!$A$2:$M$7 is the Table_Array (names and data of the individuals).
{2,3,4,5,6,7,8,9,10,11,12,13} is the Col_index_num, 12 in this example.
,0)) is the Range_lookup, meaning an exact match. (you can use FALSE also)

In this example the Table_Array is on sheet 2 but it could be on the same
sheet as the formula and would look like this

=VLOOKUP(A19,A2:M7,{2,3,4,5,6,7,8,9,10,11,12,13},0)

If you want to make changes to the formula later, say to adapt to new data
in the table_array or change the size of the table, you will need to select
all 12 of the cells in the row of the formula, make your changes in the
formula and then again commit with Ctrl+Shift+Enter.

If you want to trap for an error of no match, try this entered the same way.
All on one line in the formula bar unless the formula bar wraps it, which it
does on my sheet. If an error, then a blank return. Or exchange the "" in
the formula for "No match" for a more graphic description.

=IF(ISNA(VLOOKUP(A19,Sheet2!$A$2:$M$7,{2,3,4,5,6,7,8,9,10,11,12,13},0)),"",VLOOKUP(A19,Sheet2!$A$2:$M$7,{2,3,4,5,6,7,8,9,10,11,12,13},0))

A side note on the { }'s. {2,3,4,5,6,7,8,9,10,11,12,13} in the formula
you do type in the { }. With the array enter Excel puts them around the
formula.

HTH
Regards,
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top