Obtaining values for a cell in Excel from a separate Excel file

G

Guest

I need to have a column of cells obtain its values from a separate Excel
file. Basically I need it to perform this:

If C2=851707-401 then G2=f2we0002

I have a file that has all this information stated, column A with the
primary, column B with the alternate.

The report that I need this operation to be performed in only comes with the
primary information. I then have to manually insert the alternate info for
each item. There are over 100 items and they repeat often.

Thanks for the help.
 
F

flummi

Purtec1 said:
I need to have a column of cells obtain its values from a separate Excel
file. Basically I need it to perform this:

If C2=851707-401 then G2=f2we0002

I have a file that has all this information stated, column A with the
primary, column B with the alternate.

The report that I need this operation to be performed in only comes with the
primary information. I then have to manually insert the alternate info for
each item. There are over 100 items and they repeat often.

Thanks for the help.

This suggests a "vlookup" operation.

If your primary values are in a file "file_a" in cells a2-a100 and your
alternates in b2-b100 then on your report sheet you would open that
file and on your report sheet enter the vlookup formula in G2 and copy
down as required.

The formula looks like this:

=VLOOKUP(C2,[file_a.xls]Sheet1!$A$2:$B$100,2,FALSE)

if the file is open, after you have typed "c2," just select the other
file and mark the area of primary and alternate info.

When you close the separate file Excel changes the reference to look
like this:

=VLOOKUP(C2,'C:\[file_a.xls]Sheet1'!$A$2:$B$100,2,FALSE)

Regards,

Hans



=vlookup
 
G

Guest

Thanks flummi, it works.

flummi said:
I need to have a column of cells obtain its values from a separate Excel
file. Basically I need it to perform this:

If C2=851707-401 then G2=f2we0002

I have a file that has all this information stated, column A with the
primary, column B with the alternate.

The report that I need this operation to be performed in only comes with the
primary information. I then have to manually insert the alternate info for
each item. There are over 100 items and they repeat often.

Thanks for the help.

This suggests a "vlookup" operation.

If your primary values are in a file "file_a" in cells a2-a100 and your
alternates in b2-b100 then on your report sheet you would open that
file and on your report sheet enter the vlookup formula in G2 and copy
down as required.

The formula looks like this:

=VLOOKUP(C2,[file_a.xls]Sheet1!$A$2:$B$100,2,FALSE)

if the file is open, after you have typed "c2," just select the other
file and mark the area of primary and alternate info.

When you close the separate file Excel changes the reference to look
like this:

=VLOOKUP(C2,'C:\[file_a.xls]Sheet1'!$A$2:$B$100,2,FALSE)

Regards,

Hans



=vlookup
 

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

Top