Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding matching rows on two worksheets

Status
Not open for further replies.

Wire216

Technical User
Feb 15, 2006
18
US
I'm trying to compare rows on 2 worksheets. If there are matches then I want to take the rows off of the 1st worksheet and move it to a 3rd one.

My 1st worksheet consists of "admin calls." Column A is the phone number, H is the date, and F is the start time.

My 2nd worksheet consists of "all calls." Column I is the phone, B is the date, and C is the start time.

I want to look at each row of the 1st worksheet, and try to find a matching row on the 2nd. A match will mean the phone number, date, and start time are all the same. If it finds a match, then I want to copy the value of Column B on the 1st worksheet to Column M on the 2nd. I'll then take the row off of the 1st worksheet and move it to a 3rd worksheet (called "matches").

Any help will be greatly appreciated. This is the last piece of a project I'm working on to make our billing girl's life a lot easier.


If I need to explain anything better then please let me know. I'm posting this question in a few different forums.

Thanks.
 
I think you can use a vlookup and an if statement to figure it out.. I did a quick test, made 3 sheets.

Use a vlookup (on third sheet) and have it lookup the range of the first sheet (one of the columns, lets say phone number) then nest this in an if statement saying if the vlookup = the cell that your vlookup value is using then mark it as true if it is a match, then perform the same formula accross your 3 columns on the third sheet, so if there is a match you will see TRUE in the cell. then have a final If statement saying if three trues are in a row then youve got a match, I had something like this:

=IF(VLOOKUP(Sheet2!A1,Sheet1!A1:C3,2,0)=Sheet2!A1,"TRUE","FALSE")
 
I posted a sample of my workbook on Ozgrid.
I also explained what I'm trying to do in a little more detail.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top