R
Ricky
Hello Experts,
Row 1 is formatted at mmm-yy. Columns A & B are formatted also as mmm-yy.
How do you write a formula for cell [D2] that looks at D1's date to see if
it is within the Column A2 and B2's date range. If true, divide C2 by
(B2-A2). If false, then leave blank.
So far, my formula is
=IF(MONTH(D$5)>=MONTH($A2),ROUND($F7/MONTH($D7-$C7),2),"")
The problem is that this formula doesn't take into account of the change in
year 2004...cause a month comparison error too.
Furthermore, how do you re-write this to not exceed the B2's end date?
I've tried
=if((and(year(D$1),month(D$1))>=(and(year($A1),month($A1))),True,False)
but that doesn't work either. It's giving me True results in all cells.
A B C D E F
G H I
1 Start End Total Oct-03 Nov-03 Dec-03 Jan-04 Feb-04
Mar-04
2 Nov-03 Feb-04 $100 $0 $25 $25 $25 $25
$0
Thanks in advance,
Ricky
Row 1 is formatted at mmm-yy. Columns A & B are formatted also as mmm-yy.
How do you write a formula for cell [D2] that looks at D1's date to see if
it is within the Column A2 and B2's date range. If true, divide C2 by
(B2-A2). If false, then leave blank.
So far, my formula is
=IF(MONTH(D$5)>=MONTH($A2),ROUND($F7/MONTH($D7-$C7),2),"")
The problem is that this formula doesn't take into account of the change in
year 2004...cause a month comparison error too.
Furthermore, how do you re-write this to not exceed the B2's end date?
I've tried
=if((and(year(D$1),month(D$1))>=(and(year($A1),month($A1))),True,False)
but that doesn't work either. It's giving me True results in all cells.
A B C D E F
G H I
1 Start End Total Oct-03 Nov-03 Dec-03 Jan-04 Feb-04
Mar-04
2 Nov-03 Feb-04 $100 $0 $25 $25 $25 $25
$0
Thanks in advance,
Ricky