Go Premium for a chance to win a PS4. Enter to Win

x
Solved

# Pulling data from one sheet to another

Posted on 2016-09-08
Medium Priority
59 Views
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
• 2

LVL 34

Accepted Solution

Rob Henson earned 2000 total points
ID: 41789315
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 34

Assisted Solution

Rob Henson earned 2000 total points
ID: 41789317

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 14

Expert Comment

ID: 41855833
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

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, tâ€¦
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
###### Suggested Courses
Course of the Month12 days, 8 hours left to enroll