title: Googledocs spreadsheet query wierd when sorting first field
body: <p>I have a weird problem with referencing another sheet in my Googledocs spreadsheet. I have an address list with names, phones etc. and a category field. I have several tabs with a sheet for each category and a filter so I only have to enter the users once. This works fine, e.g. on one tab i have all users with category "Møbler". So this code works in the "Møbler" tab:</p>
  
  <pre><code>=query(Adresseliste!A2:I256;"select A,B,C,D,E,F,G,H,I where H contains 'Møbler' ")
  </code></pre>
  
  <p>The list shows up like this (returned 3 results):</p>
  
  <p><a href="https://www.dropbox.com/s/letmm58xw2ywrjc/sort_col2.png" rel="nofollow">Sorting Column 2</a></p>
  
  <p>But I really want to sort the main list by column 1. But then strange things happen. I get a bunch of names in the first cell. What could be wrong? I tried to move the first few cells from the main list down but then it only displays the other first ones. The names in the first cell also do not match the search criteria. Sorting on Column 1 gives 3 results + a whole bunch of records in the first row.</p>
  
  <p><a href="https://www.dropbox.com/s/2jdstnxe2rx86rb/sotr_col1.png" rel="nofollow">Sorting Column 1</a></p>
  
  <p>So there should be only returned 3 names but the first row is filled with names not even in the search. I can sort on any other column and it gives a correct result. But not on Column 1!</p>