title: Excel VBA Macro: Check content (of clipboard?) before pasting
body: <p>I've had some serious issues with pasting data from various sources into Excel. Excel tends to try to be smart and does all kinds of silly formating. We need the data as text. </p>
  
  <p>The problem is that we have a lot of users, and many of them are not very experienced with computers, so asking them to use right-click and 'Paste Special' every time is not an option.</p>
  
  <p>I found a solution in recording a macro that uses 'Paste Special' and 'text', and overriding the ctrl-v to use this function. It seemed to work perfectly, until I marked a cell, copied it, and tried to paste it. The macro crashed.</p>
  
  <p>So what I need is a function that can check if I am trying to paste some copied text, and then use this line:</p>
  
  <pre><code> ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _
          False
  </code></pre>
  
  <p>While if I am pasting a marked cell, I want to run this line (to paste just the value): </p>
  
  <pre><code>Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
          :=False, Transpose:=False
  </code></pre>
  
  <p>I am not very experienced in writing VBA macros for Excel (and I hope I never have to be), so if anyone have a few pointers, I'd be most grateful.</p>