title: How to delete empty cells and shift up in Google Sheets?
body: <p>Is there a way to delete empty cells in a given range and shift the column up to the desired display as shown below? Closest I came was </p>
  
  <pre><code>=ARRAYFORMULA({A1:C1; TRANSPOSE(SPLIT(TRANSPOSE(QUERY(A2:C,,999^99)), " "))})
  </code></pre>
  
  <p>which removes empty cells, but splits the first names and surnames into separate cells, which I have not figured out how to avoid. Pfa a made-up sample of current and desired displays:</p>
  
  <p><a href="https://i.stack.imgur.com/gA9CS.png" rel="nofollow noreferrer">Current Display</a></p>
  
  <p><a href="https://i.stack.imgur.com/zkT9O.png" rel="nofollow noreferrer">Desired Display</a></p>