You don't make it one else if statement. Why? Because you are actually testing multiple DIFFERENT tests. You should only use an if-elseif setup if you are testing one type of tests and want to do an "one or the other" situation. You have three tests going on here... one that tests if it is a number, one that tests if a number is in a certain range and one that tests if it is a whole number. Another way you can detect that it has these three tests is that you have three different error messages.
What you want to do is the following....
CODE
if it is a number
if that number does not contain a period and is between 1 and 3999
do your math here
else
report that they need to provide a whole number between 1 and 3999
else
report that they need to provide a number
Notice that this solution is also a combination of if statements and not if else if statements. You could have combined them into one if the tests were similar like I did above with the number does not contain a period and is in between a range.
But design wise they should not be merged into one if... probably why you are having trouble.
Besides, you don't gain speed or anything by merging them. So go with what works logically rather than syntactically.