Excel divide by months until year end

Hello and thanks in advance

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
James MurrellProduct SpecialistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Saurabh Singh TeotiaCommented:
I'm assuming this is what you are looking for...

Saurabh..
Data.xlsx
Kanti PrasadCommented:
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)
James MurrellProduct SpecialistAuthor Commented:
Saurabh Singh Teotia that is great but if they enter 0 you calculation shows 1
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Saurabh Singh TeotiaCommented:
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)

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
James MurrellProduct SpecialistAuthor Commented:
sorry not in date field in c3   i changed but still did not work sorry
Kanti PrasadCommented:
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
James MurrellProduct 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)
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.