Try this Private Sub Worksheet_Change(ByVal Target As Range) Dim arr, i As Long arr = Range("a2:d" & Range("a65356").End(xlUp).Row - 1) 'On Error GoTo err: Application.EnableEvents = False If Target.Count > 1 Then Application.Undo If Target.Column = 2 Then
For i = LBound(arr) To UBound(arr) If UCase(arr(i, 1)) = UCase(Range("a" & Target.Row).Value) And UCase(arr(i, 2)) = UCase(Range("b" & Target.Row).Value) Then Range("c" & Target.Row).Value = arr(i, 3) Range("d" & Target.Row).Value = arr(i, 4) Exit For End If Next End If Application.EnableEvents = True Exit Sub 'err: Application.EnableEvents = True MsgBox err.Description End Sub On Thu, Jun 5, 2014 at 11:01 PM, Eugene Bernard <eugene.bern...@gmail.com> wrote: > Hi all, > > Please find attahced sheet. > > I have a requirement like this. > > In this scenario, I have parts with unique ID which passes thro' 3 stages > like S1,S2,S3. > > whenever user updates a new row, based on ID and Stage as well as qty, > the status should get updated automatically. > > in this example, after adding a new row in row 5, the status column of ID > A001 should get update automatically to "12" ie "A002" is now at stage 2. > > Can anybody help me on this please. > > Regards > Eugene > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 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) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > -- *Regards* *Ashish Koul* *Visit* http://www.excelvbamacros.in Like Us on Facebook <https://www.facebook.com/excelvbacodes> Join Us on Facebook <http://www.facebook.com/groups/163491717053198/> P Before printing, think about the environment. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 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) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post 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 unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.