Another day — More time to play.
Thanks for kicking this off, EP. I've been working on your attempt, and will describe what I have done. I am using Excel 2010 on Windows 7, in "compatibility mode". When I use the file as you provided it I get the same (wrong) results you get.
I then noticed that you had constrained inputcell to be binary rather than integer. Fixing this led to:
(Inputcell value before Solver // Inputcell value after Solver)
0<=X<=6.999 // Unchanged (even non-integer values)
7<=X<=inf // Gets right answer (but inputcell will be non-integer)
Next change was to change Solver's Options»GRGnonlinear»Derivative setting from Forward to Central. Now results are:
0<=X<=1.999 // Unchanged (even non-integer values)
2<=X<=inf // Gets right answer (but inputcell will be non-integer)
Next change was to untick the "ignore integer constraints" box in Solver's Options»AllMethods. Results:
0<=X<=1.499 // 1 (which is wrong)
1.5<=X<=1.999 // 2 (which is wrong)
2<=X<=inf // 5 (which is correct)
I could not improve on this, despite trying heaps of things. (Even changing the inputcell>=1 constraint to inputcell>=2 did not get around the problem, it merely moved the "error boundary" from X=2 to X=3.)
My final version of EP's spreadsheet is (hopefully) attached and downloadable.
What seems to be happening is that if the starting value for inputcell points to the first entry in the list, Solver is unable to calculate a derivative so it simply gives up. No error message, which is very naughty: it just leaves inputcell unchanged, except for integer-izing it if requested.
The only way around this that I can see is to set up your list of discrete variables with a dummy first entry, a value that you can be absolutely sure will never be part of your optimum solution, and to ensure that you never use this dummy entry as your starting point. But make sure that this dummy does not introduce an excessive lack of smoothness.
Neat segue into smoothness. I fear that this entire approach will not be reliable if whatever "function" you are feeding the selected list values into is not adequately "smooth" with respect to changes in the index value. See ElectricPete's graph: it is this that needs smoothness. How smooth is "smooth enough"? I have no idea. But I do know that Solver failed when I randomised the order of EP's table. So, if your list contains, say, bolt diameters and strengths and costs, and your optimisation is to seek the cheapest bolt-size / bolt-number combination that meets some strength criterion, then your list should present the bolts in order of size.
Another possible caution. Given that the underlying problem seems to be somehow associated with the calculation of a (secant-based) derivative, there might be some problems if Solver homes in on either the first or the last member of the list. The suggestion two paragraphs above will avoid it homing in on the first member. A similar ruse should probably be applied to avoid the last member.
An interesting, and somewhat revealing, little issue. Thanks for bringing it up. (And anti-thanks for causing me to lose a significant part of my weekend.)