Solved

Excel  Worksheet Relationships

Posted on 2016-11-18
7
35 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
[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
  • 4
  • 3
7 Comments
 
LVL 48

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 48

Expert Comment

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

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 48

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

632 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