Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# How To Use VLOOKUP or INDEX Across Two Excel Files

Posted on 2010-11-08
Medium Priority
344 Views
I have two Excel files, each with a list a US States, their abbreviations, and 3, non-adjacent columns of data I would like displayed in file A from file B.  I will attach the files I am working with.

In FileA, the columns should match the data in the corresponding columns in FileB based on the listed state.

FileA.xlsx
FileB.xlsm
0
Question by:asc2010
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• Learn & ask questions
• 2

LVL 81

Accepted Solution

byundt earned 2000 total points
ID: 34086621
For FileA cell D13, you could use a lookup formula like:
=VLOOKUP(B13,'[FileB.xlsm]United States'!\$B\$7:\$U\$58,MATCH(D\$12,'[FileB.xlsm]United States'!\$B\$6:\$U\$6,0),FALSE)

If the lookup table in FileB contained fields for Size and Phase, you could copy the formula across.

0

LVL 6

Expert Comment

ID: 34086676
Beat me to it Brad, but here's the files anyway....

FileA.xlsx
0

Author Closing Comment

ID: 34086941
byundt:

Awesome!!! Thank you so much, it works perfectly!
0

LVL 81

Expert Comment

ID: 34086974
If you do copy the formula across, you'll need to add a \$ for the state abbreviation column and the very beginning of the formula:
=VLOOKUP(\$B13,'[FileB.xlsm]United States'!\$B\$7:\$U\$58,MATCH(D\$12,'[FileB.xlsm]United States'!\$B\$6:\$U\$6,0),FALSE)

The header label in cell D12 must match exactly one of the header labels in row 6 of FileB. If not, you'll get #N/A as the result of the formula.

0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
###### Suggested Courses
Course of the Month11 days, 14 hours left to enroll

#### 636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.