For the dates and consistency it would be simplest to use a formula, eg:
For the column references - yes you would remove the $ preceding the reference to G however you would also want to adjust such that the col_index_num incremented also... so:
though you could just as easily use an INDEX/MATCH construct
However, what I would suggest [based on the example file] is that given you're returning numerics a SUMIF would be far more straightforward:
note in all of the above the hardwired reference to "cat", "dog" etc is replaced by a simple relative cell reference such that you can apply the same formula to all rows without need for modification.
Bookmarks