Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding a Name on a list and returning all matching rows Wh0o Excel Worksheet Functions 2 August 18th 09 05:52 PM
Finding matching numbers in different rows. classic3283 Excel Worksheet Functions 1 October 7th 08 04:26 AM
Finding matching fields accross multiple worksheets alpha417 Excel Discussion (Misc queries) 2 May 31st 06 12:46 PM
finding matching cells in worksheets Marcin Wolku Excel Worksheet Functions 1 August 25th 05 04:46 PM
finding matching cells in worksheets Marcin Wolku Excel Programming 1 August 25th 05 02:24 PM


All times are GMT +1. The time now is 02:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"