# Trying to construct a list if greater than answer to prior question

if a respondent says they would be interested in upgrading their speed, we want to know what speed they'd like to upgrade to, but the list should only show speeds faster than they currently have. so basically if currentspeed=1, then the list should only show 2-9, if currentspeed=2 then the list should only show 3-9.

this is what i currently have written but its giving me error 132

Begin Unverified Perl
if(VALUE("CurrentSpeed")=1)
{REMOVE("SpeedList",1)}
elsif(VALUE("CurrentSpeed")=2)
{REMOVE("SpeedList",1,2)}
elsif(VALUE("CurrentSpeed")=3)
{REMOVE("SpeedList", 1, 3)}
elsif(VALUE("CurrentSpeed")=4)
{REMOVE("SpeedList", 1, 4)}
elsif(VALUE("CurrentSpeed")=5)
{REMOVE("SpeedList", 1, 5)}
elsif(VALUE("CurrentSpeed")=6)
{REMOVE("SpeedList", 1, 6)}
elsif(VALUE("CurrentSpeed")=7)
{REMOVE("SpeedList", 1, 7)}
elsif(VALUE("CurrentSpeed")=8)
{REMOVE("SpeedList", 1, 8)}
else("SpeedList")
End Unverified

```Add(SpeedList, CurrentSpeed + 1, 9)
```
Nice and simple, I love it!  I was focused more on the solution that was being used instead of simplifying it.
Thanks, Jay.  Good to have both bases covered.

Two things I notice.  The first is adding a semicolon after each instruction.  The second is you have a final else statement with no instruction, just a list name.  I believe the below code should work.

```ADD (Speedlist)
Begin Unverified Perl
if(VALUE("CurrentSpeed")=1)
{REMOVE("SpeedList",1);}
elsif(VALUE("CurrentSpeed")=2)
{REMOVE("SpeedList",1,2);}
elsif(VALUE("CurrentSpeed")=3)
{REMOVE("SpeedList", 1, 3);}
elsif(VALUE("CurrentSpeed")=4)
{REMOVE("SpeedList", 1, 4);}
elsif(VALUE("CurrentSpeed")=5)
{REMOVE("SpeedList", 1, 5);}
elsif(VALUE("CurrentSpeed")=6)
{REMOVE("SpeedList", 1, 6);}
elsif(VALUE("CurrentSpeed")=7)
{REMOVE("SpeedList", 1, 7);}
elsif(VALUE("CurrentSpeed")=8)
{REMOVE("SpeedList", 1, 8);}
End Unverified
```
answered Oct 23, 2019 by Gold (44,500 points)