I’m trying to determine costs based on when they were paid out. Currently, it is set up like this:
ColA ColB ColC ColD
Date Amount Paid
2011 $50 Y 0
2012 45 N 1
2012 75 Y 1
2012 10 N 1
2013 50 Y 2
2013 50 N 2
ColD is based on the year, it is hidden at the end of the end of the columns and I am using it for something else, so I figure I can use it to determine the year instead of testing the date over and over. I can use ColE, with an IF statement like IF(AND(ColC1=Y,ColD=0),ColB1,0) for the entire column, then add that total when I want it. But then I will need a ColF to check for ColC equaling Y and ColD equaling 1, adding that column for the 2012 total. The problem is basically needing to add another column for each successive year.
Is there anyway to check ColC and ColD, keeping a separate subtotal for each year as the 2 criteria are met?