title: Excel VBA Type 13 Mismatch using Array containing values and strings
body: <p>I'm having trouble with a Runtime Error 13 "Type mismatch error".  I am trying to take multiple lines of code and condense them into one line that is each row placed side by side.  The problem is that my inputs are strings and numbers, which is what I believe is causing this problem.  How can I fix this?</p>
  
  <pre><code>Sub multRowsTo1Row()
      Dim inputRange As Variant
      Dim outputRange As Variant
  
      inputRange = Selection
      y = UBound(inputRange, 1)
      x = UBound(inputRange, 2)
  
      ReDim outputRange(1 To x * y)
  
      For j = 1 To y
          For i = 1 To x
              outputRange(i + y(j - 1)) = inputRange(j, i)
          Next i
      Next j
  
      Selection.Offset(0, x).Select
  
  
  End Sub
  </code></pre>