title: Sort excel 2007 pivot table descending by last column with VBA
body: <p>Thanks guys! I think I may have explained my problem a bit vague. I'm attaching two print screens in order to illustrate my problem. </p>
  
  <p>Print screens: <a href="http://imageshack.us/photo/my-images/804/illustrasjon.jpg" rel="nofollow">http://imageshack.us/photo/my-images/804/illustrasjon.jpg</a></p>
  
  <p>My pivot table shows stops [minutes] due to specified reasons on a production line. The 'Totalt' column of the week (in which the number of production days vary) is what I wish to focus on in order to allocate improvement efforts to the right place. The sorting will be performed on a daily basis by others than me, and they really should have a button to press rather than sorting via the options bar.</p>
  
  <p>NB! The 'Sum' column is not part of the pivot table. That's just a calculation of the 'Totalt' column to a fixed column in order to make a sector chart of the sorted result, since it's not possible to make a pivot chart from the 'Totalt' column.</p>
  
  <p>The 'Mål per dag' column is just the daily (minutes) goal within which I wish to keep the production stops of a specified reason, so this should be kept out of the 'Totalt' column, but this is less important.</p>
  
  <hr>
  
  <p>I have a pivot table filtered by weeks showing any number of days from one to five. The total column to the right that sums up the values of the days are therefore "moving", and this is why I cannot simply record a macro. I want to create a macro that sort the pivot table descending by the total column.</p>
  
  <p>I do not speak the international language of VBA, but imagine that this is fairly easy for someone who does.</p>
  
  <p>Immensely grateful to anyone willing to write the code for me!</p>
  
  <p>Best regards,
  Hans</p>