Lookup Help

W

Whitney

Could you tell me the best way to accomplish my goal...

I have a master spreadsheet that contains customer name and customer ID. I
have data spreadsheet that contains customer name, customer ID, Call type
(Inbound or outbound), reason code, date.

I need the master spreadsheet to reference the data spreadsheet and look for
a match of customer ID, and return call type and reason code. If there is
more than one match, to look at the date and time and return the most recent
call
type, reason code and date. If there is no match, then leave blank.

Example:
Master
A B
Name ID
1 Mickey 1234

Data
A B C D E
F
Name ID Type Reason Date
Time
1 Mickey 1234 Outbound LM 9/1/2009
1:30pm
2 Mickey 1234 Inbound Comp 9/2/2009
10:00am

Updated Master
A B C D E
F
Name ID Type Reason Date
Time
1 Mickey 1234 Inbound Comp 9/2/2009
10:00am
 
D

Don Guillett

Sub FINDLAST()'source file must be OPEN
What = InputBox("Enter name")
Set mf =
Workbooks("sourcefilename.xls").Sheets("sheetname").Cells.Find(What,
lookat:=xlWhole, _
SearchDirection:=xlPrevious)
If Not mf Is Nothing Then MsgBox mf.Row
End Sub
 
W

Whitney

I need a little more help understanding the VBA code. Very new to VBA.
I have one file with two tabs. First sheet named "Master" is the master list
with name and ID, second sheet named "Data" is the call data with name, ID,
type, reason, date, and time of call.
I want the return values to display on the "Master" sheet in a new column on
the same row as the record for each customer.
 
D

Don Guillett

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top