Hi,
So i have a set of data that i want to pull information of and deplete as i get more and more for example.
Below, in column Z i have the current number, so if cell A2 matches the above (this one doesnt due to it been the first cell with data) i want it to see if the number in Z2 is bigger than I2 if it is then the answer is I2.
If it is smaller then the answer is Z2. But if AB1 is populated with a number and A2 and A1 are the same number then use AB1-I2.
But then in column AB2 this would be Z2 - I2 but only if A2 and A1 match, if they dont it would be AB1-AA2
The formula i have in AA2 is "=IF(A2=A1,IF(AB1=0,0,AB1-(AB1-I2)),IF(Z2>I2,I2,Z2-I2))"
The formula i have in AB2 is "=IF(I2>AA2,0,IF(A2=A1,IF(AB1-I2<=0,0,AB1-I2),Z2-I2))"
So really on the table below AA3 should show 31 because AB2 is 31 and its less than I3.
When you get to A13 the number changes so it would start back from scratch and not use any data from above.
Hope this explains it well enough
So i have a set of data that i want to pull information of and deplete as i get more and more for example.
Below, in column Z i have the current number, so if cell A2 matches the above (this one doesnt due to it been the first cell with data) i want it to see if the number in Z2 is bigger than I2 if it is then the answer is I2.
If it is smaller then the answer is Z2. But if AB1 is populated with a number and A2 and A1 are the same number then use AB1-I2.
But then in column AB2 this would be Z2 - I2 but only if A2 and A1 match, if they dont it would be AB1-AA2
The formula i have in AA2 is "=IF(A2=A1,IF(AB1=0,0,AB1-(AB1-I2)),IF(Z2>I2,I2,Z2-I2))"
The formula i have in AB2 is "=IF(I2>AA2,0,IF(A2=A1,IF(AB1-I2<=0,0,AB1-I2),Z2-I2))"
So really on the table below AA3 should show 31 because AB2 is 31 and its less than I3.
When you get to A13 the number changes so it would start back from scratch and not use any data from above.
Hope this explains it well enough