Hi,

You seem to have the makes of a Vlookup.

Are you after something like this

=IF(F6<5,1,IF(F6>5,(VLOOKUP(F6,DED!$A$1:$B$11,2,FALSE))))

VBA Noob