Hey all!
I have a tough time doing a table in Excel that my dad asked me to do :P. I'm totally new into VBA and I could use some help from you. The thing is that I have 2 identical tables in separate sheets. My goal is to move a row from table in sheet1(in progress) to the table in sheet2(status). The information in whole row can be moved to the other table only if the condition will be met. In this scenario a project has to be accepted (in column W there are 3 options to choose - accepted, negotiation in progress, rejected). So whenever someone will choose that the project is accepted I would like the whole row to be moved into the same table but in another sheet on the bottom, right under other projects. I have tried using this:
But as far as it is deleting the row from sheet1 it is not showing up inside the table in sheet2. I have been trying to find a solution connected to naming a table, but I simply do not understand how to use it or if it's even the correct lead to follow.
Your help will be very much appreciated!
Please let me know if you need more explanation in order to get the understanding of what I mean by that
I have a tough time doing a table in Excel that my dad asked me to do :P. I'm totally new into VBA and I could use some help from you. The thing is that I have 2 identical tables in separate sheets. My goal is to move a row from table in sheet1(in progress) to the table in sheet2(status). The information in whole row can be moved to the other table only if the condition will be met. In this scenario a project has to be accepted (in column W there are 3 options to choose - accepted, negotiation in progress, rejected). So whenever someone will choose that the project is accepted I would like the whole row to be moved into the same table but in another sheet on the bottom, right under other projects. I have tried using this:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Target.Column = 23 And Target.Value = "Accepted" Then
LrowCompleted = Sheets("Status").Cells(Rows.Count, "A").End(xlUp).Row
Range("A" & Target.Row & ":W" & Target.Row).Copy Sheets("Status").Range("A" & LrowCompleted + 1)
Range("A" & Target.Row & ":W" & Target.Row).Delete xlShiftUp
End If
Application.EnableEvents = True
End Sub
Your help will be very much appreciated!
Please let me know if you need more explanation in order to get the understanding of what I mean by that