Help with lookup code

  • Thread starter Thread starter browie
  • Start date Start date
B

browie

Which lookup code do I use for the following

On a worksheet I have a row starting with a particular number, what I need
to do is for excel to look for the exact match to the number in the range
"a10:a20", When it finds the match in need the code to copy the entire row
to that number in the range?

some thing like this

a b c d e
1 10
2 11
3 12
4 13
5 14
6 15

13 alpha beta charlie delta echo

if I have 13 in cell "a35" I would like it to copy like this

a b c d e f
1 10
2 11
3 12
4 13 alpha beta charlie delta echo
5 14
6 15


Hope anyone can help

Thanks

Browie
 
If the list of lookup values is sorted, you can use VLOOKUP. Just use a
slightly different value in each column, e.g. for column B (assuming row 2,
and using LookupTable to stand for your table of lookup values):
=VLOOKUP($A2,LookupTable,2,0)
For column C:
=VLOOKUP($A2,LookupTable,3,0)
and so on...

If not sorted you can use MATCH and OFFSET in the form
=OFFSET(LookupTable,MATCH($A1,LookupTableColumnA,0)-1,1,1,1)
apply this similarly in each column changing only the 3rd parameter from the
end, which tells how many columns over to read the data from.
 

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

Back
Top