title: ArrayFormula Only Iterating The First Value Throughout the Column, Need All the Values that Fit the Criteria
body: <p>The problem:</p>
  <p>I have two sheets,
  <strong>Auto Expenses &amp; Business Expenses</strong> (duplicate sheets with different categories of expenses)
  Column J represents the cost of an expenses
  Column F represents the date of the expense</p>
  <p>I am trying to <strong>create a function that will add up all of the expenses between both sheets given a start date &amp; an end date and iterate down the column</strong></p>
  <p>Here is the function I wrote:</p>
  <pre><code>=ArrayFormula(if(isblank(F2:F),&quot;&quot;,SUMIFS('Auto Expenses'!$J$7:$J,'Auto Expenses'!$F$7:$F,&quot;&gt;=&quot;&amp;O2:O,'Auto Expenses'!$F$7:$F,&quot;&lt;=&quot;&amp;P2:P)+SUMIFS('Business Expenses'!$J$7:$J,'Business Expenses'!$F$7:$F,&quot;&gt;=&quot;&amp;O2:O,'Business Expenses'!$F$7:$F, &quot;&lt;=&quot;&amp;P2:P)))
  </code></pre>
  <p><strong>O2:O</strong> is a <strong>list of start dates</strong> &amp; <strong>P2:P</strong> is a <strong>list of end dates</strong>&gt;</p>
  <p>When I run the function, it will only return the first sum of the expenses and iterate all the way down with the same value.</p>
  <p><strong>What am I doing wrong?</strong></p>
  <p>If I use this function instead and drag is down, it gives the proper results, but I want it to iterate down the column automatically</p>
  <pre><code>=SUMIFS('Auto Expenses'!$J$7:$J,'Auto Expenses'!$F$7:$F,&quot;&gt;=&quot;&amp;O2,'Auto Expenses'!$F$7:$F, &quot;&lt;=&quot;&amp;P2)+SUMIFS('Business Expenses'!$J$7:$J,'Business Expenses'!$F$7:$F,&quot;&gt;=&quot;&amp;O2,'Business Expenses'!$F$7:$F, &quot;&lt;=&quot;&amp;P2)
  </code></pre>
  <p>Here is a link to a copy of the spreadsheet for reference: <a href="https://docs.google.com/spreadsheets/d/1Lbrvsrz90RSYhedwA8IkyoYlHqWy5Lw7Ngxw5eRjAKs/edit?usp=sharing%5Benter" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1Lbrvsrz90RSYhedwA8IkyoYlHqWy5Lw7Ngxw5eRjAKs/edit?usp=sharing[enter</a> image description here][1]</p>