Solved

Excel  Worksheet Relationships

Posted on 2016-11-18
7
31 Views
Last Modified: 2016-11-20
I have an Excel Sheet with two worksheets.

Worksheet1 and Worksheet2 are tables. I created a relationship between the two tables. I need to populate a column in Worksheet2 with data from Worksheet1 based on the relationship. See attached file for illustration.
Capture.PNG
0
Comment
Question by:allan_lee
  • 4
  • 3
7 Comments
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 41893568
This assumes the data is in colums A to C. Place in C2 in Sheet2 and copy down.

=VLOOKUP(A2,Sheet1!$A$2:$C$5,3)
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 41893586
BTW $A$2:$C$5 is the range of the data on Sheet1.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 41893614
If the number of rows of data on Sheet1 may change over time then select the data and create a named range with the formula =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A),3). That will enable the named range to dynamically change with the number of data rows. Give it a name like LookupRange and then your formula on Sheet2 can be
=VLOOKUP(A2,LookupRange,3).
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:allan_lee
ID: 41894518
Martin, I am getting an error saying "A Value is not available to the formula or function" when I try your formula.. Any more thoughts?
0
 

Author Comment

by:allan_lee
ID: 41894621
After some more digging around, the error I was getting was due to a cells formatted as text.. After converting all the data in column A to number, the formula worked.. Thanks.
0
 

Author Closing Comment

by:allan_lee
ID: 41894622
Thanks.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 41894864
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

809 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