Solved

Pulling data from one sheet to another

Posted on 2016-09-08
3
54 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 33

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 33

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

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,…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
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 …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

730 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