Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SumIF Equation I am trying to use potentially a SUMIF equation to do a calculati

ID: 3570523 • Letter: S

Question

SumIF Equation

I am trying to use potentially a SUMIF equation to do a calculation. I have 4 columns that are affected by this potentially. The first is a date column, the second is a purchase price column, then the 3rd & 4th columns are the prices in 2013 and 2014 respectively. What I would like to do is have an equation (SUMIF or whatever) that will look at the date column and if it was purchased in 2012, then sum the difference in the purchase price and the 2013 price. Then the same for the next year; if it's purchased in 2013, then sum the difference in the purchase price and the 2014 price. My goal is to have this built out so that we can get 2014 purchases and 2015 prices into the spreadsheet and be able to proactively track the differences.

Let me know if you have any ideas.

Thanks!!

Explanation / Answer

Hi..

I think this would work, now and in the future - with dates in column A, purchase price in B, the number 2013 in C1 with 2013 prices starting in C2, 2014 in D1, 2015 in E1 (and the prices for those years in those columns), then in F2, use the formula

=IFERROR(INDEX(C2:F2,MATCH(YEAR(A2)+1,$C$1:$E$1,FALSE))-B2,"")

Then copy down to match your data.

hope this help !!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote