PaulF
Active Member
Hello all!!
I'm working on some bids that have a very complicated schedule or activities and funding. Upper management wants to see out of $$$ across the months to ensure our milestones and billing covers what we are spending properly...
It would be easy if each phase started and ended on the 1st and EOMonth.... but they don't... So the formula needs to take that into account... I'm not sure why this kicked my butt so hard but it did... I have a functioning formula, but it is ugly and too long...
I'm guessing there is an easier way:
=IF(OR(YEAR(W$2)*100+MONTH(W$2)<YEAR($E6)*100+MONTH($E6),YEAR(W$2)*100+MONTH(W$2)>YEAR($F6)*100+MONTH($F6)),"",IF(AND(MONTH(W$2)=MONTH($E6),YEAR(W$2)=YEAR($E6)),(EOMONTH($E6,0)-$E6)*($G6/($F6-$E6)),IF(AND(MONTH(W$2)=MONTH($F6),YEAR(W$2)=YEAR($F6)),DAY($F6)*($G6/($F6-$E6)),DAY(EOMONTH(W$2,0))*($G6/($F6-$E6)))))
I'm working on some bids that have a very complicated schedule or activities and funding. Upper management wants to see out of $$$ across the months to ensure our milestones and billing covers what we are spending properly...
It would be easy if each phase started and ended on the 1st and EOMonth.... but they don't... So the formula needs to take that into account... I'm not sure why this kicked my butt so hard but it did... I have a functioning formula, but it is ugly and too long...
I'm guessing there is an easier way:
=IF(OR(YEAR(W$2)*100+MONTH(W$2)<YEAR($E6)*100+MONTH($E6),YEAR(W$2)*100+MONTH(W$2)>YEAR($F6)*100+MONTH($F6)),"",IF(AND(MONTH(W$2)=MONTH($E6),YEAR(W$2)=YEAR($E6)),(EOMONTH($E6,0)-$E6)*($G6/($F6-$E6)),IF(AND(MONTH(W$2)=MONTH($F6),YEAR(W$2)=YEAR($F6)),DAY($F6)*($G6/($F6-$E6)),DAY(EOMONTH(W$2,0))*($G6/($F6-$E6)))))
