View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Clivey_UK
 
Posts: n/a
Default How To Retrieve Data from Sheet2 into Sheet1


I think the formula you're looking for is VLOOKUP. This will work as
long as the numbers in column A (e.g. 10) are in order.
Try this in Sheet 1 column B row 7:
=VLOOKUP($A7,Sheet2!$A$7:$Z$1000,COLUMN(B2))
This assumes that (ignoring the headings) the data in Sheet2 is in the
range A7 to Z1000; change the formula if it's different (e.g. replace
$A$7:$Z$1000 with $A$7:$FZ$10000). The $'s are important for then
copying the formula.
The formula basically looks up what you've put in A7 (which is 10) and
then finds the row this is on in Sheet2 and then looks at the value in
the same column (B in this example) for that row.
Copy the formula across and down. The columns will need to be the same
order in both sheets.
Clive

compconnj Wrote:
What Function can I use to get data from Sheet2 into Sheet1 based on
input on Sheet1? IF function won't work because tables will be several
hundred rows long. If a function can't be used, is there another way to
do it?

What I mean is if (Sheet 2 column A row 7) has a value of "10", and on
(Sheet 1 column A row 7) I enter "10", I would like "ABC Trucking" to
be entered in (Sheet 1 column B row 7) and I would like "3:00 PM" to be
entered in (Sheet 1 column E row 7), etc. See attached spreadsheets as
an example which should clarify what I mean. Thanks for your help.



--
Clivey_UK
------------------------------------------------------------------------
Clivey_UK's Profile: http://www.excelforum.com/member.php...o&userid=32569
View this thread: http://www.excelforum.com/showthread...hreadid=524864