View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default returning multiple cell values from a vlookup

You can use an incrementer for the column index param in the vlookup to
facilitate easy copying across from the point formula cell, eg:
COLUMNS($A:A)+1

Something along these lines, based on your descript, should work fine

In sheet: B,
Put in B2:
=VLOOKUP($A2,A!$A:$G,COLUMNS($A:A)+1,0)
Copy B2 to G2, fill down as far as required

And if you need an error trap to return blanks: ""
for any unmatched cases, put this instead in B2:
=IF(ISNA(VLOOKUP($A2,A!$A:$G,COLUMNS($A:A)+1,0))," ",VLOOKUP($A2,A!$A:$G,COLUMNS($A:A)+1,0))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,500 Files:358 Subscribers:55
xdemechanik
---
"SueB" wrote:
I have worksheet A with 5 columns of information and 10 rows.

I have worksheet B with just one column of information and multiple rows.

Column A in both worksheets are codes.

I want to do a function that will look at col A, find the match to it on
worksheet B and then return columns B-G on the same line that it matched
column A on.

I know this sounds fuzzy but I can return one value (i.e. column B2, but not
columns b2 through 6g

Any help would be terrific. I tried to use the vlookup function but got
messed up when I went to reference columns b through g.

Thank you!

Susan