The PMT function is used to calculate the payment amount for a loan, but it seems that in this case you know the payment amount and want to calculate the number of periods.
To do this, you need to use the NPER function instead of the PMT function.
The NPER function is almost exactly the same as the PMT function, but it extracts the number of periods instead of the payment amount. You can also use the PV and RATE functions to calculate the present value and interest rate of a loan if you have the other values.
The PMT function is covered in the PDF and video lesson: Expert Skills Lesson 3-3: Use the formula palette and the PMT function.
Each of the four functions works in a very similar way, so I would recommend starting here and making sure that you completely understand the PMT function.
I have attached an example spreadsheet. Your example data was a little hard to read, so I'm not sure if I have it exactly right, but hopefully this will offer a good starting point and example of how to use the NPER function:
The formula to return the number of months is: =NPER((E2/12),C2,-B2)
If you need more assistance, please feel free to attach your spreadsheet and I will take another look.
Jonathan is part of the professional team who answer Excel-related questions posted on the ExcelCentral.com forums.
Jonathan also tests our courses prior to publication and has worked on all of our ten world bestselling Excel books for Excel 2007, Excel 2010, Excel 2013, Excel 2016 for Windows and Excel 2016 for Apple Mac. Jonathan has also worked on over 850 video lessons for or video courses covering Excel 2007, Excel 2010 and Excel 2013.
As well as extensive Excel knowledge, Jonathan has worked in the IT world for over thirteen years as a programmer, database designer and analyst for some of the world's largest companies.