I'm trying to work out the NPV of a simple repayment profile that has a stepped rental i.e X months at $100 followed by Y months at $1000

I can do this by creating lists but I want to develop a calculator where I can solve the NPV by having X & Y as variable numbers. I have other tools I can use outside Excel to do this (TValue & HP17BII) but want to include this in a spreadsheet tool.

Thanks in advance for any help.