Solved

Pulling data from one sheet to another

Posted on 2016-09-08
3
46 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 32

Accepted Solution

by:
Rob Henson earned 500 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 32

Assisted Solution

by:Rob Henson
Rob Henson earned 500 total points
ID: 41789317
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 14

Expert Comment

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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,…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
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.

803 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