Option Explicit Sub checksyssystem1() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Dim r As Long Dim r1 As Long Dim c As Long
For r = 2 To Cells(Rows.Count, "a").End(xlUp).Row For r1 = 2 To Cells(Rows.Count, "g").End(xlUp).Row If Cells(r, "a") = Cells(r1, "e") And Cells(r, "c") = Cells(r1, "g") Then Cells(r1, "f") = Cells(r, "b") Cells(r1, "h") = Cells(r, "d") If Cells(r, "a") = "" Then Exit For End If End If Next r1 Next r Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True End Sub On 10 September 2012 21:04, Siraj Momin (BTG) <smo...@ccc.ae> wrote: > Dear members > > > > The following macro I am using to match the values of col A and Col C with > Col E and Col G and if matched update the value of Col B to Col. F and the > value of Col D to Col H. Its working fine on small data but on large data > its taking time can anyone suggest some correction or improvement in this > macro. > > > > Due to the size limit of the group I did not attached the file. > > > > > > Siraj > > > > > > Option Explicit > > > > Sub checksyssystem1() > > Dim r As Long > > Dim r1 As Long > > Dim c As Long > > > > For r = 2 To Cells(Rows.Count, "a").End(xlUp).Row > > > > > > For r1 = 2 To Cells(Rows.Count, "g").End(xlUp).Row > > If Cells(r, "a") = Cells(r1, "e") And Cells(r, "c") = Cells(r1, "g") Then > > Cells(r1, "f") = Cells(r, "b") > > Cells(r1, "h") = Cells(r, "d") > > If Cells(r, "a") = "" Then > > Exit For > > End If > > > > End If > > Next r1 > > Next r > > > > End Sub > > -- > Join official facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES (1120+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will > not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > 6) Jobs posting is not allowed. > > 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To post to this group, send email to excel-macros@googlegroups.com. > To unsubscribe from this group, send email to > excel-macros+unsubscr...@googlegroups.com. > > -- Regards David Grugeon -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com.