I have non-contiguous dates in column A and corresponding numbers in column B. I have contiguous dates in column C and corresponding numbers in column D. I want to multiply a single column D value (e.g. D1) by a single column B value (e.g. B1) only if the dates in column C fall between adjacent dates in column A (e.g. A1-A2). This is fairly straightforward using the array formula in E1, {=IF(($C$1:$C$4>=$A$1:$A$4)*($C$1:$C$4<=$A$1:$A$4),D1*$B$1)}. The problem with this formula arises when the contiguous date in column C is no longer bounded by the first set of adjacent dates in column A. In this case, I want to multiply the values in column D with the next value in column B (e.g. B2). My formula will always multiply the value in column D with B1 (i.e. D1*$B$1). The value that I want in E5 (i.e. the situation when the date in column C is not bounded by the first set of adjacent dates in column A) is shown in F5 (=D5*$B$2). I do not know how to do this in excel. Also, I would prefer not to change the non-contiguous dates in column A to contiguous dates, which would make this problem trivial. Please help
Bookmarks