title: VBA Paste Cells Stored in Dictionary to Cells in Another Worksheet
body: <p>I'm trying to search a column of cells from one worksheet, find all of the unique values, and then paste those values to a column in another worksheet. So far I have code that creates a dictionary, searches through the desired column, and selects all of the unique values in that column.</p>
  
  <pre><code>Function UniqueRequest() As Long
  
          myReqIDCol = ColSearch("id")
  
          'Creates a dictionary filled with each unique value in the "TaskIDList" column and counts them to determine how many unique keys are in the document
          Set dic = CreateObject("Scripting.Dictionary")
          For i = 1 To LastRow
              tmp = Cells(i, myReqIDCol).Value
              If Not dic.exists(tmp) Then
                  dic.Add tmp, 1
              End If
          Next i
  
  End Function
  </code></pre>
  
  <p>I also have a function that selects the sheet I want to paste the cells to and sets it up so it pastes values into each successive blank cell in the desired column. </p>
  
  <pre><code>Function ReqSheet(input_column As Integer, input_value As Long) As Long
  
          Dim rv As Long
  
              rv = 1
  
              Sheets("Request Results").Activate
              Do While Cells(rv, input_column).Value &lt;&gt; ""
                  rv = rv + 1
              Loop
              Cells(rv, input_column).Value = input_value
  
      ReqSheet = input_value
  
      End Function
  </code></pre>
  
  <p>The issue I have is that I'm not entirely sure how to relate these two. I want to call the ReqSheet function with each value of the dictionary, but everything I've tried has failed. Sorry if this is an easy fix, but I can't really find a good solution from the internet and I'm fairly new to VBA.</p>