Q:

Add additional logic to the VBA code for additional functionality

Need to add some additional logic to the code to make it do some more things for me.
So here it is:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long
Dim rng As Range
If Target.Address = Home.Range("_newCustomer").Address Then
  Set rng = Sheets("Customers").Range(IIf(Range("_newCustomer") = "Company", "Company", "Customer_Name"))
  On Error Resume Next
  i = WorksheetFunction.Match(Range("_newCustomer"), rng, 0)
  On Error GoTo 0
  Application.EnableEvents = False
  Home.Range("_paymentDue").Value = IIf(i = 0, "", Sheets("Customers").Range("Customers").Cells(i, 12))
  Home.Range("_invoiceDueDate").Value = IIf(Home.Range("_invoiceDate").Value = 0, "", Home.Range("_paymentTermsDay").Value + Home.Range("_invoiceDate").Value)
  Application.EnableEvents = True
End If
End Sub

so far it works fine, but what I also need from it is when I am changing the value in the range _invoiceDate, the range _invoiceDueDate should reflect the change, for instance if I am deleting everything from _invoiceDate the _invoiceDueDate should act accordingly. Also if I am changing anything in the range _paymentDue, which is a dropdown list, this change must also change the value of the _invoiceDueDate as it is shown in the code above Home.Range("_invoiceDueDate").Value = IIf(Home.Range("_invoiceDate").Value = 0, "", Home.Range("_paymentTermsDay").Value + Home.Range("_invoiceDate").Value).
Please help

A:

Try this one:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False

    Dim i As Long
    Dim rng As Range
    If Target.Address = Range("_newCustomer").Address Then
      Set rng = Sheets("Customers").Range(IIf(Range("_newCustomer") = "Company", "Company", "Customer_Name"))
      On Error Resume Next
      i = WorksheetFunction.Match(Range("_newCustomer"), rng, 0)
      On Error GoTo 0
      Range("_paymentDue").Value = IIf(i = 0, "", Sheets("Customers").Range("Customers").Cells(i, 12))
    End If

    If Not Intersect(Target, Union(Range("_newCustomer"), Range("_invoiceDate"), Range("_paymentDue"))) Is Nothing Then
          Range("_invoiceDueDate").Value = IIf(CStr(Range("_invoiceDate").Value) = "", "", IIf(CStr(Range("_paymentTermsDay").Value) = "", 0, Range("_paymentTermsDay").Value) + Range("_invoiceDate").Value)
    End If

    Application.EnableEvents = True
End Sub

