Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding matching rows on two worksheets
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. -- Wire323 ------------------------------------------------------------------------ Wire323's Profile: http://www.excelforum.com/member.php...o&userid=33218 View this thread: http://www.excelforum.com/showthread...hreadid=532530 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding matching rows on two worksheets
Try: (not tested) Sub m() set ws1 = Worksheets("AdminCalls") set ws2=WorkSheets("AllCalls") set ws3=WorkSheets("Matches") For each c in ws.Range("a:f") For each k in ws2.Range("a:i") if c.value = k.Offset(0,9).value and c.Offset(0,8).value k.Offset(0,2).value And c.Offset(0,6).value = k.Offset(0,3).value Then c.offset(0,1).copy k.Offset(0,13) c.EntireRow.Copy ws3.Range("a" & Range("a65536").end(xlUp).Row) end if next next end su -- david ----------------------------------------------------------------------- davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064 View this thread: http://www.excelforum.com/showthread.php?threadid=53253 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding matching rows on two worksheets
I posted a sample of my workbook at http://www.ozgrid.com/forum/showthre...d=1#post251349. I also explained what I'm trying to do in a little more detail. Thanks. -- Wire323 ------------------------------------------------------------------------ Wire323's Profile: http://www.excelforum.com/member.php...o&userid=33218 View this thread: http://www.excelforum.com/showthread...hreadid=532530 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding a Name on a list and returning all matching rows | Excel Worksheet Functions | |||
Finding matching numbers in different rows. | Excel Worksheet Functions | |||
Finding matching fields accross multiple worksheets | Excel Discussion (Misc queries) | |||
finding matching cells in worksheets | Excel Worksheet Functions | |||
finding matching cells in worksheets | Excel Programming |