title: Non-contiguous named range into an array, then into row in different sheet
body: <p>I'm trying to get data posted from a non-contiguous range into a row in a separate sheet.  Before I built the non-contiguous range, this code worked perfectly.  I've tried several things to loop through, but nothing I tried will work.  It won't copy the ranged data as it sits.  It's been years since I've actually done any coding and my re-learning curve seems to be holding me back.... the logic just isn't coming to me.  Help!</p>
  
  <pre><code>Sub UpdateLogWorksheet()
  
  Dim historyWks As Worksheet
  Dim inputWks As Worksheet
  
  Dim nextRow As Long
  Dim oCol As Long
  
  Dim myCopy As Range
  Dim myTest As Range
  Dim myData As Range
  
  Dim lRsp As Long
  
  Set inputWks = Worksheets("Input")
  Set historyWks = Worksheets("DataEntry")
  oCol = 3 'order info is pasted on data sheet, starting in this column
  
  'check for duplicate VIN in database
  If inputWks.Range("CheckVIN") = True Then
    lRsp = MsgBox("VIN already in database. Update record?", vbQuestion + vbYesNo, "Duplicate VIN")
    If lRsp = vbYes Then
      UpdateLogRecord
    Else
      MsgBox "Please change VIN to a unique number."
    End If
  
  Else
  
    'cells to copy from Input sheet - some contain formulas
  
    Set myCopy = inputWks.Range("VehicleEntry") 'non-contiguous named range
  
    With historyWks
        nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
    End With
  
    With inputWks
        'mandatory fields are tested in hidden column
        Set myTest = myCopy.Offset(0, 2)
  
        If Application.Count(myTest) &gt; 0 Then
            MsgBox "Please fill in all the cells!"
            Exit Sub
        End If
    End With
  
    With historyWks
        'enter date and time stamp in record
        With .Cells(nextRow, "A")
            .Value = Now
            .NumberFormat = "mm/dd/yyyy hh:mm:ss"
        End With
        'enter user name in column B
        .Cells(nextRow, "B").Value = Application.UserName
        'copy the vehicle data and paste onto data sheet
  
        myCopy.Copy
        .Cells(nextRow, oCol).PasteSpecial Paste:=xlPasteValues, Transpose:=True
        Application.CutCopyMode = False
    End With
  
    'clear input cells that contain constants
    Clear
  End If
  
  End Sub
  </code></pre>