title: Setting a dynamic spin value in excel (VBA)
body: <p>I've spent way too much time trying to figure this out, I think I am just too unfamiliar with VBA.</p>
  
  <p>I'm trying to make a spin SmallChange change dynamically with a cell's value.</p>
  
  <p>So essentially I input some number into the target cell, and in another cell (preferably the same input one but I can't find a way to do that) gets outputted a value that changes with the spin clicks, and depending on the input cell's value, the SmallChange on the spin changes.</p>
  
  <p>Example: </p>
  
  <p>12.34 gets input into A1
  Spin.SmallChange gets set to 5 (due to a series of if statements)
  I spin that value up or down and a number gets outputted in A2 based on the spin amount
  The spinner SmallChange should continue to check the output amount to see if it needs to change values
  Sorry I am just realizing this is very difficult to put into words. I've tried doing it on paper, applying different loops, and I just can't figure it out. It seems so simple.</p>
  
  <p>This is what I got so far (after many failed other lines of code)</p>
  
  <pre><code>Private Sub Spin2_Change()
  
  Dim x 'input cell
  Dim y 'output cell
  
  'set x to input cell value
  x = Sheet1.Range("A12")
  
  'Setting spin value based on input number
  If x &gt;= 0 And x &lt; 1 Then
      Sheet1.Spin2.SmallChange = 1
  
  ElseIf x &gt;= 1 And x &lt; 20 Then
      Sheet1.Spin2.SmallChange = 5
  
  ElseIf x &gt;= 20 And x &lt; 100 Then
      Sheet1.Spin2.SmallChange = 10
  
  ElseIf x &gt;= 100 And x &lt; 500 Then
      Sheet1.Spin2.SmallChange = 50
  
  ElseIf x &gt; 500 And x &lt; 1000 Then
      Sheet1.Spin2.SmallChange = 100
  
  Else: Sheet1.Spin2.SmallChange = 500
  
  End If
  
  
  
  End Sub
  </code></pre>
  
  <p>Problem is that this only checks the first input cell which is not changing (because i can't figure out how). So when the output cell gets changed (which I can do with just an additional line of code) the spinner value doesn't change. Essentially I need to find out how to check, or make float values, or something? </p>
  
  <p>Also note that the Spin.SmallChange values need to get divided by 100 to incorporate decimals to the input number.</p>