You should add points to include the edges of the interval as well. You can copy and paste the above code into a new worksheet of your own to mess around with it.