Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Matching Data on different cells

Hello,

I have been working on creating a data matching program that takes two
worksheets and compares one against the other. That is Each row in Sheet1 is
compared against All rows in Sheet2 and when a match is found a redirect
occurs to another page. For some reason when I run the "comparing" portion of
the code it appears to lock up with the little white window in the title bar.
However if you wait long enough it seems most of the time it does completely
finish. Normally if this problem does not occur it displays row by row each
match found that is redirected.

Ever heard of this before?

Thanks,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 221
Default Matching Data on different cells

If you want people to help troubleshoot your code, you'd better post it. :)
*******************
~Anne Troy

www.OfficeArticles.com


"born2jam4ever" wrote in message
...
Hello,

I have been working on creating a data matching program that takes

two
worksheets and compares one against the other. That is Each row in Sheet1

is
compared against All rows in Sheet2 and when a match is found a redirect
occurs to another page. For some reason when I run the "comparing" portion

of
the code it appears to lock up with the little white window in the title

bar.
However if you wait long enough it seems most of the time it does

completely
finish. Normally if this problem does not occur it displays row by row

each
match found that is redirected.

Ever heard of this before?

Thanks,




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Matching Data on different cells

Thank You,

Here is an example of what it is doing. For each row it compared
multiple cells using a nested control structure with For..Next. The amount of
rows on each page is calculated in a formula ahead of time that the code
reads. i & r being the values. and counter representing the last row on the
output_sheet that was pasted on.


Dim counter, i, r
counter = 1

For i = 2 To Excel.Worksheets("Program").Cells(2, 2).Value

For r = 2 To Excel.Worksheets("Program").Cells(2, 3).Value

If Excel.Worksheets("Extract1").Cells(r, 8).Value =
Excel.Worksheets("Extract2").Cells(i, 8).Value And _
Excel.Worksheets("Extract1").Cells(r, 10).Value =
Excel.Worksheets("Extract2").Cells(i, 10).Value And _
Excel.Worksheets("Extract1").Cells(r, 14).Value =
Excel.Worksheets("Extract2").Cells(i, 14).Value And _
Excel.Worksheets("Extract1").Cells(r, 16).Value =
Excel.Worksheets("Extract2").Cells(i, 16).Value Then

Excel.Worksheets("Extract1").Cells(r, 1).EntireRow.Copy
Excel.Worksheets("OutputSheet").Rows(counter).Past eSpecial
counter = counter + 1

End If

Next

Next

"Anne Troy" wrote:

If you want people to help troubleshoot your code, you'd better post it. :)
*******************
~Anne Troy

www.OfficeArticles.com


"born2jam4ever" wrote in message
...
Hello,

I have been working on creating a data matching program that takes

two
worksheets and compares one against the other. That is Each row in Sheet1

is
compared against All rows in Sheet2 and when a match is found a redirect
occurs to another page. For some reason when I run the "comparing" portion

of
the code it appears to lock up with the little white window in the title

bar.
However if you wait long enough it seems most of the time it does

completely
finish. Normally if this problem does not occur it displays row by row

each
match found that is redirected.

Ever heard of this before?

Thanks,





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
How to sort data according two matching cells? Dave Excel Worksheet Functions 2 June 11th 07 07:06 AM
matching cells and transfering data Hurler99 Excel Worksheet Functions 2 January 11th 07 08:30 PM
How do I compare data in two worksheets to find matching cells? Gary Excel Discussion (Misc queries) 4 March 2nd 06 09:04 PM
Matching data and linking it to the matching cell yvonne a via OfficeKB.com Links and Linking in Excel 0 July 13th 05 07:30 PM
Loop cells - get all rows with matching data - paste into different wb Buffyslay_co_uk Excel Programming 2 July 23rd 04 01:20 PM


All times are GMT +1. The time now is 01:22 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"