Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy a line dependant on identifier in new workbook

Status
Not open for further replies.

adamf

Technical User
Mar 7, 2002
51
0
0
GB
I am trying to create a spreadsheet that pulls data into a form (actually another workbook). Which row of data is imported is dependant on a single integer input on the new workbook.

For example, I want cell Book2!A2 to display the data shown in Book1!A4 so the formula needs to read the integer, which will be 4 so it knows to imput data from A4 and not A?

Basically, how do I tell exel to get it's data from Book1, RowA, CellX (4 in this case)




Adam F
Solaris System Administrator
 
have a look at the INDIRECT function

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
This doesn't seem to get around the problem of getting the data from another named workbook

If it worked, what i'd want the formula in the cell where the data is to be imported would read:

=Sheet1!A(COLUMN NUMBER DEFINED BY INTEGER IN THIS WORKBOOK)

Any more ideas?

Adam F
Solaris System Administrator
 
well you need to provide more info then - we ain't mind readers - where are you getting the 4 from - WHERE in the other workbook - HOW will it be identified as the number to use ??

have you looked at the help for the INDIRECT function ??


if you have a 4 in cell A2 in book2 then

=INDIRECT("[Book1]Sheet1!A" & A2)

will convert to
=[Book1]Sheet1!A4

is that not what you want ??



Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top