title: Updating an excel worksheet from another sheet, depending on a value
body: <p>I am trying to create an If Statement that lets me send an number and a value to another workbook deepening on a value in a 3rd cell (weather the cell is is True or False"). The code that I want to run if the statement is True is below. I have tested this code, and it works, I just want it to happen if the third cell in the row is True. It then needs to carry the information from the number and value rows where the value is true into the function below.</p>
  
  <pre><code>        Dim itemName As String
          Dim itemPrice As String
          Dim myData As Workbook
  
          Worksheets("Sheet1").Select
          InvoiceNumber = Range("A2")
          qty = Range("B2")
          updated = Range("C2")
  
  
          Set myData = Workbooks.Open("HD:Users:user:Desktop:Inventory.xlsm")
          Worksheets("Orders").Select
          Worksheets("Orders").Range("a15").Select
          RowCount = Worksheets("Orders").Range("a15").CurrentRegion.Rows.Count
          With Worksheets("Orders").Range("a15")
          .Offset(RowCount, 0) = InvoiceNumber
          .Offset(RowCount, 1) = qty
          .Offset(RowCount, 2) = updated
  
          End With 
  </code></pre>