title: Google Sheets IF Function using "one of many" values
body: <p>I'm trying to figure out a faster way to write this function:</p>
  
  <p><strong>IF(X1=A1;B1:H1;IF(X1=A2;B2:H2;IF(X1=A3;B3:H3;</strong> //<em>and so on up to</em> <strong>If(X1=A400;B400:H400))))</strong></p>
  
  <p>What I want is basically, if <strong>X1 equals any value</strong> from the <strong>range A1:A400</strong>, then I want the <strong>corresponding row</strong> inserted. For example, if <strong>X1=A50</strong> I want the <strong>range B50:H50</strong> inserted, If <strong>X1=A199</strong> I want the <strong>range B199:H199</strong> inserted and so on. Is there a way to achieve this without writing over 400 lines per hand? </p>