title: Is there a way to improve speed/performance of google sheets functions?
body: <p>I recently worked on a project in google sheets. While everything is working, changes in the page take a while to process and load. There are a few parts of the project (described below). <strong>Is there a way to find out what is causing the biggest load on the project, so that I can work on that area?</strong></p>
  
  <p>Alternatively, if someone has experience with the following types of functions, what do you think is causing the biggest slowdown:</p>
  
  <ul>
  <li><p>I have a query to lookup and match values. Would this be faster as a <code>vlookup</code> with <code>sort</code> in an <code>arrayformula</code>?</p>
  
  <p><code>=IFERROR(QUERY(Record!A:C,"Select A where B = '"&amp;B7&amp;"' order by A desc limit 1 label A ''"),"")</code></p></li>
  <li><p>I have random number generation through an <code>arrayformula</code>:</p>
  
  <p><code>=ARRAYFORMULA(IF(ROW(B6:B)=6,"RANDOM",IF(ISBLANK(B6:B),"",RANDBETWEEN(0+0*ROW(B6:B),COUNTA(B6:B)))))</code></p>
  
  <p>This fills in a cell with a random number if the one next to it has a value. I use this for random sampling in another query later.</p></li>
  <li><p>I have some conditional formatting based on whether the cell has something in it.</p></li>
  <li>I have some data validation based on a range of cells.</li>
  </ul>
  
  <p>Note: Since my main question is about performance, I didn't think having an example file would be beneficial. It would take me a little to make one so if Ii should, let me know. Also, since other questions deal with scripting performance (like <a href="https://stackoverflow.com/questions/40384435/optimizing-the-speed-of-hide-in-google-sheets">this one</a> and <a href="https://stackoverflow.com/questions/42632622/use-google-apps-script-to-loop-through-the-whole-column">this one</a>) I feel like my question is different.</p>