# Excel divide by months until year end

i have a sales sheet which staff record date, customer and recurring amount...

what i need is another column which works out the recurring amount by month left until end year (which is in cell z1, 31st may 2016)

Please note I am not great at excel.....but willing to learn

example

date                         Customer       Recurring

15 June 2015           AS                          2300
17 June 2015           BE                         17000
2 July 2015               CF                        25000

need

date                         Customer       Recurring    New

15 June 2015           AS                          2300      12 month left so total ok
17 June 2015           BE                         17000     12 month left so total ok
2 July 2015               CF                        25000      I think i need divide by 12 then multiply by 11
2 August 2015         GH                      125000     I think i need divide by 12 then multiply by 10

etc

hope you guys can help
LVL 31
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
I'm assuming this is what you are looking for...

Saurabh..
Data.xlsx
0
Commented:
Hi

Put the below formula in each cell of Recurring and see that every row has Z1 as your date is in Z1.

With the below formula, the Recurring column will have   2300, 17000, 20833.3, 93750

=IF((YEAR(Z1)-YEAR(A2))*12+MONTH(Z1)-MONTH(A2)<11,(C2/12*YEAR(Z1)-YEAR(A2))*12+MONTH(Z1)-MONTH(A2),C2)

=IF((YEAR(Z1)-YEAR(A3))*12+MONTH(Z1)-MONTH(A3)<11,(C3/12*YEAR(Z1)-YEAR(A3))*12+MONTH(Z1)-MONTH(A3),C3)

=IF((YEAR(Z3)-YEAR(A4))*12+MONTH(Z3)-MONTH(A4)<=11,(C4/12*YEAR(Z3)-YEAR(A4))*12+MONTH(Z3)-MONTH(A4),C4)

=IF((YEAR(Z4)-YEAR(A5))*12+MONTH(Z4)-MONTH(A5)<=11,(C5/12*YEAR(Z4)-YEAR(A5))*12+MONTH(Z4)-MONTH(A5)C5)
0
Product SpecialistAuthor Commented:
Saurabh Singh Teotia that is great but if they enter 0 you calculation shows 1
0
Commented:
You can use this Formula..

=IF(OR(DATEDIF(A2,DATE(2016,5,31),"YM")+1=12,A2=0,A2=""),"",(C2/12)*DATEDIF(A2,DATE(2016,5,31),"YM")+1)
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Product SpecialistAuthor Commented:
sorry not in date field in c3   i changed but still did not work sorry
0
Commented:
Hi

Please use this updated xls . I just added the month difference column so that the formula will not look too big. This one will calculate values for less that a year or even if required for more than a year
UpdatedXls.xlsx
0
Product SpecialistAuthor Commented:
thanks you pointed me in right direction and i managed to understand you new code: i made a change in one part but this is correct solution

my change
=IF(OR(DATEDIF(A2,DATE(2016,5,31),"YM")+1=12,C2=0,C2=""),"",(C2/12)*DATEDIF(A2,DATE(2016,5,31),"YM")+1)
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.