Adding Cells and Indexing
Here's an array formula**.
What if the total isn't *exactly* 336?
=INDEX(A1:A20,MATCH(TRUE,SUBTOTAL(9,OFFSET(B1,,,RO W(INDIRECT("1:"&ROWS(B1:B20)))))=E1,0))
Where E1 = 336
If the total of column B is <336 then the formula returns #N/A
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
--
Biff
Microsoft Excel MVP
"Archengineer" wrote in message
...
I have two columns. One column contains dates the other contains numbers
from 1 to 24. I need to add consecutive cells in the second column until
I
total 336 and then output the date at which that occurs. I've been
racking
my brain on how to do this and I think there's any easy answer, but I
can't
find it. Can someone help me?
|