title: Adding content of a cell into a string variable in VBA. Also, adding cells below it using offset
body: <p>I have a simple function that is going to pull from a specific Cell (N4). If there are cells below it then it will loop and collect all the content of the cell and separate with comma.</p>
  
  <p>I'm getting <code>#VALUE!</code> error in excel right now and I kind of know where my issue lies but can not figure how to fix it, since I am not that proficient with <code>excel-vba</code> code. I think the issue is with <code>ActiveSheet.Range("N4").Value</code> and the offset part. </p>
  
  <p>I am not sure how to offset then select the value in the text then add it to my string Value.
  Any thought on how I can select the content of cell and add to string variable and doing the same when you offset?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Function pullshit() As String
  
  Dim output As String
  Dim counter As Integer
  
  counter = 1
  
  output = ActiveSheet.Range("N4").Value
  
  If Application.offset(N4, counter, 0).Value = "" Then
  
      pullshit = output
  
  Else
      While counter &lt;&gt; 0
          output = output + ", " + Application.offset(N4, counter, 0).Value
          counter = counter + 1
  
          If Application.offset(N4, counter, 0) = "" Then
              counter = 0
          End If
      Wend
  
      pullshit = output
  
  End If
  
  End Function
  </code></pre>