title: excel formula or macro to automatically convert long form data to wide form
body: <p>I want to have function that will change the long form of data to wide form. This means that each level of factor will be in separate column in excel. </p>
  
  <p>I want to automate this process so that every time I do not need to do a lot of copy and paste when number of levels of a factor is very high. </p>
  
  <p>Something like the following : </p>
  
  <p><img src="https://i.stack.imgur.com/EBE2W.jpg" alt="enter image description here"></p>