Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
shehasclass
 
Posts: n/a
Default Lookup & Return Range of Data

I have tried everything and cannot figure this out......

I need to look up text in a range of data, and when a match is found,
have Excel return the data in the 11 cells to the right of the match.
It would be best if the match cell could be returned as well (making a
total of 12 horizontal cells, e.g., A4:L4).

Example:

My formula will be entered in cell A2 of sheet 1.
My data table will be in A5:L20 of sheet 2.

Formula will say "if sheet 2 cell A5 is xxx, then return the contents
of cells A5 THROUGH L5".

I hope I am being clear. I've tried everything I can think of -
vlookup, match, index. I can't figure out how to return the data from
a range of cells. Help! Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Lookup & Return Range of Data

In A2 put

=IF(ISNA(VLOOKUP($A1,Sheet2!$A$5:$L$20,COLUMNS($A$ 1:A1),0)),"no
Match",VLOOKUP($A1,Sheet2!$A$5:$L$20,COLUMNS($A$1: A1),0))

copy across to L2, replace A1 with either the value you looking up of a cell
where you put the same value

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"shehasclass" wrote in message
ps.com...
I have tried everything and cannot figure this out......

I need to look up text in a range of data, and when a match is found,
have Excel return the data in the 11 cells to the right of the match.
It would be best if the match cell could be returned as well (making a
total of 12 horizontal cells, e.g., A4:L4).

Example:

My formula will be entered in cell A2 of sheet 1.
My data table will be in A5:L20 of sheet 2.

Formula will say "if sheet 2 cell A5 is xxx, then return the contents
of cells A5 THROUGH L5".

I hope I am being clear. I've tried everything I can think of -
vlookup, match, index. I can't figure out how to return the data from
a range of cells. Help! Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.misc
shehasclass
 
Posts: n/a
Default Lookup & Return Range of Data

Thank you Peo. This worked for the first row (A2), but when I copy the
formula down, each row returns the same info, rather than returning the
info from the row where it is finding my value.

Is this something to do with the absolute reference in this part of the
formula: COLUMNS($A$1:A1) ?? The "A1" will change to "B1", etc., of
course, as I copy it down, but the data returned is still the info from
line A.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
how to lookup a value within a range and return a label jocmccoy Excel Discussion (Misc queries) 1 November 16th 05 11:52 AM
return a range of cells from a vertical lookup vickyb_au Excel Worksheet Functions 2 October 11th 05 11:15 AM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"