title: How to multiply selected range with selected number in Excel via VBA
body: <p>I want to simplify the macro I am using in Excel to multiply selected range. I often export data from SAP and the values are formated as text. An easy way to change them to numbers is to multiply them by 1. I also sometimes need to multiply values by -1 or any other number. 
  I created a macro that does what I need, but as you can see, it has to find a blank cell, write the value in it, multiply selected range and delete the value. I would like to have a macro without the process of finding the blank cell and writing anything in it. </p>
  
  <pre><code>Sub macro()
      Dim Cinitel As Integer
      Dim PocetRadku As Long
      Dim PocetSloupcu As Integer
  
      Cinitel = InputBox("Enter a number to multiply with")
  
      PocetSloupcu = Range("a1").CurrentRegion.Columns.Count
      PocetRadku = Range("a1").CurrentRegion.Rows.Count
  
      Cells(PocetRadku + 1, PocetSloupcu) = Cinitel
      Cells(PocetRadku + 1, PocetSloupcu).Copy
  
      Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlMultiply, _
        SkipBlanks:=True, Transpose:=False
  
      Cells(PocetRadku + 1, PocetSloupcu) = ""
  
      Calculate
  End Sub
  </code></pre>
  
  <p>I can't use DataObject to put some value in Clipboard. </p>
  
  <p>I came up with something like this but it does not work obviously :)</p>
  
  <pre><code>Sub macro1() 
      Dim myString As String 
      Dim number As Integer 
  
      number = InputBox("Enter a number to multiply with") 
      myString = Selection.Address 
      myString.Formula = Application.Evaluate("=" &amp; myString &amp; "*" &amp; number)
  </code></pre>
  
  <p>Can you help me?</p>