Solved

Pulling data from one sheet to another

Posted on 2016-09-08
3
35 Views
Last Modified: 2016-10-23
I have a prospect list in Excel. The list of prospects is in one sheet with all prospect details, and the transactions / call outs / follow ups that I do are in another sheet in the same file.

What I am trying to do is:
(a)  Copy a prospect on the transaction sheet.
(b)  Depending on the name entered, excel automatically pulls the contact number and location from the respective cells in the master sheet into the corresponding cells in the transaction sheet, next to the prospect. For example: I enter the name of prospect from Row number 201 (in master sheet) to the transaction sheet. Then excel should search the master sheet for the name, and pick up the contact number and location and place it in the cells next to the prospect in the transaction sheet. So far so good.
(c)  This I have done using VLOOKUP. If Column for "Name" in the transaction sheet is B, and I have typed a name from the master sheet in B250, then the VLOOKUP reads the value in B250, searches the master for Anil Kumar, and picks phone number and location in the respective cells. If no name is entered, the contact and location details remain blank. The formula that I have used is VLOOKUP(B14,'Prospect Master'!$F$2:$H$414,2,0) and VLOOKUP(B14,'Prospect Master'!$F$2:$H$414,3,0).
(d)  In my prospects, names are repeated. For example, I have one Anil Kumar from Delhi, and another Anil Kumar from Hyderabad. VLOOKUP picks up the first occurrence and places the contact and the location against this occurrence in the transaction sheet.

How can I:
(a)  Ensure that the location and the contact are for the 2nd Anil Kumar (if it is the second occurrence) or 3rd, and excel picks up the details from 2nd or 3rd Anil Kumar.
(b)  Without name, the location and contact fields remain empty.
0
Comment
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
Rob Henson earned 500 total points
Comment Utility
See attached.

Put simply, this annotates a name with a count of the name and then does the lookup based on that value rather than the name.

The name count columns can be hidden if required.

Thanks
Rob H
multiple-lookup.xlsx
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 500 total points
Comment Utility
In addition, question (b):

Add an IF statement to the front of the VLOOKUP to check for blank:
=IF(B14="","",VLOOKUP($A14,'Prospect Master'!$A$2:$H$414,7,0))

Thanks
Rob H
0
 
LVL 13

Expert Comment

by:frankhelk
Comment Utility
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Rob Henson (https:#a41789315)
-- Rob Henson (https:#a41789317)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

frankhelk
Experts-Exchange Cleanup Volunteer
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now