Hi,
I'm currently using the following simple code in my worksheet.
It's simply changing the status of a job if another columns status changes.
I'd also like to run the following in the same sheet, but where I have ####, this would be a 4 digit code, a quote reference number starting at 1500 upwards, so its never the same.
Could I please ask if anyone can offer some advice as to how to run them both in the one sheet.
In case its relevant, the status column (G) can either be updated once a job is invoiced, or if a job has been quoted.. So it might get updated first once its quoted, but then again once the job is invoiced ? Not sure if this is makes a difference to the order of the code, but thought it relevant to advise.
Thanks,
Mike
I'm currently using the following simple code in my worksheet.
It's simply changing the status of a job if another columns status changes.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Range("B" & Target.Row).Value = Now
End If
If Not Intersect(Target, Range("J:J")) Is Nothing Then
If LCase(Target.Value) = "yes" Then
Range("O" & Target.Row).Value = Now
Range("G" & Target.Row).Value = "Invoiced"
Else
Range("O" & Target.Row).Value = ""
End If
End If
End Sub
I'd also like to run the following in the same sheet, but where I have ####, this would be a 4 digit code, a quote reference number starting at 1500 upwards, so its never the same.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Range("B" & Target.Row).Value = Now
End If
If Not Intersect(Target, Range("I:I")) Is Nothing Then
If LCase(Target.Value) = "####" Then
Range("O" & Target.Row).Value = Now
Range("G" & Target.Row).Value = "Quoted"
Else
Range("O" & Target.Row).Value = ""
End If
End If
End Sub
Could I please ask if anyone can offer some advice as to how to run them both in the one sheet.
In case its relevant, the status column (G) can either be updated once a job is invoiced, or if a job has been quoted.. So it might get updated first once its quoted, but then again once the job is invoiced ? Not sure if this is makes a difference to the order of the code, but thought it relevant to advise.
Thanks,
Mike