Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to sort data according two matching cells? | Excel Worksheet Functions | |||
matching cells and transfering data | Excel Worksheet Functions | |||
How do I compare data in two worksheets to find matching cells? | Excel Discussion (Misc queries) | |||
Matching data and linking it to the matching cell | Links and Linking in Excel | |||
Loop cells - get all rows with matching data - paste into different wb | Excel Programming |