I have a macro which works lovely on one of my tabs, which if i put a YES in column BR it moves it from 121 c+d to 121 Disch. this is it:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
'' dvuppx
'
Dim Ws As Worksheet
Application.EnableEvents = False
On Error GoTo Xit
If Target.Column <> 70 Or UCase(Target.Value) <> "YES" Then GoTo Xit
Set Ws = Sheets("121 Disch")
Target.EntireRow.Copy Ws.Range("A" & Rows.Count).End(xlUp).Offset(1)
Ws.Range("BQ" & Rows.Count).End(xlUp).Offset(, 1) = Date
Target.EntireRow.Delete
Xit:
Application.EnableEvents = True
End Sub
its beautiful and it works. However. I have another tab on the same spreadsheet called DH WL which is a waiting list for either DH Wed or DH Fri. On DH WL, there is information which i enter in columns a-c. i would like to be able to go onto DH WL and in column D write either Wed or Fri to allocate that entry, the information in columns a-c, to be relocated to tab 'DH Wed' or 'DH Fri', and delete column D where ive written either wed or fri for the allocation, if that makes sense.
Additionally, in tab DH wed and FRI, instead of in columns a-c i need the information to be put into the next available columns T to V. When trying to do this, i cant seem to rearrange the macro to fit and also when i put it in, it says that the worksheet_change reference is too ambiguous. can anyone help here?
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
'' dvuppx
'
Dim Ws As Worksheet
Application.EnableEvents = False
On Error GoTo Xit
If Target.Column <> 70 Or UCase(Target.Value) <> "YES" Then GoTo Xit
Set Ws = Sheets("121 Disch")
Target.EntireRow.Copy Ws.Range("A" & Rows.Count).End(xlUp).Offset(1)
Ws.Range("BQ" & Rows.Count).End(xlUp).Offset(, 1) = Date
Target.EntireRow.Delete
Xit:
Application.EnableEvents = True
End Sub
its beautiful and it works. However. I have another tab on the same spreadsheet called DH WL which is a waiting list for either DH Wed or DH Fri. On DH WL, there is information which i enter in columns a-c. i would like to be able to go onto DH WL and in column D write either Wed or Fri to allocate that entry, the information in columns a-c, to be relocated to tab 'DH Wed' or 'DH Fri', and delete column D where ive written either wed or fri for the allocation, if that makes sense.
Additionally, in tab DH wed and FRI, instead of in columns a-c i need the information to be put into the next available columns T to V. When trying to do this, i cant seem to rearrange the macro to fit and also when i put it in, it says that the worksheet_change reference is too ambiguous. can anyone help here?