?
Solved

How To Use VLOOKUP or INDEX Across Two Excel Files

Posted on 2010-11-08
4
Medium Priority
?
340 Views
Last Modified: 2012-05-10
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
Comment
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
4 Comments
 
LVL 81

Accepted Solution

by:
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.

Brad
0
 
LVL 6

Expert Comment

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

FileA.xlsx
0
 

Author Closing Comment

by:asc2010
ID: 34086941
byundt:

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

Expert Comment

by:byundt
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.

Brad
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

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

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

Join & Ask a Question