View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Somewhat Complex: Allocation of Payments

Ugh! This is turning into quite a mess. I have a date (1/31/2008) in E2.
Using the day function, I have the number of days in that month, which is 31,
in cell E4. I have a start date (1/29/2008) in A5 and an End Date
(1/15/2009) in B5. I have the number of days in C5 and an amount ($120,000)
in D5. I am trying to allocate that $120,000 over the entire time interval,
from 1/29/2008 to 1/15/2009. For instance, E5 should show $680, because
there are 353 days between the start date and the end date and there are two
days between 1/29/2008 and 1/31/2008. Based on the same logic, I would
expect to see $9,858 in F5. Fill-right; so on and so forth. Finally, I
would expect to see $5,439 in Q5. Then, when I sum all the data elements on
this row, I would like to see a total of $120,000, which indicates that all
payments have been made and accounted for. After all this, I would go to E5,
and fill-down a few rows, and all cells should populate with the correct
payments/amounts.

I am using this function:
=IF(AND($A5E$2,$B5E$2),0,IF(E$2-E$4<$A5,(E$4-DAY($A5))*$D5/$C5,IF(E$2-E$4<$B5,(E$4-DAY($B5))*($D5/$C5),E$4*($D5/$C5))))

It is close, but not quite correct. Id appreciate any and all assistance.
This is somewhat complicated for me, only because I cant seem to get my mind
into it. In all honesty, I dont think it is all that difficult though.

Thanks!!


--
RyGuy