View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Gordon Rainsford Gordon Rainsford is offline
external usenet poster
 
Posts: 9
Default 'If' Statement - Must be a Better Way to Do This!

Paige wrote:

Thanks everyone! Am in the process of trying these out now. One question,
for Gordon. The user has the option to select (via a drop-down) in C17 the
following: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11+. Your code works great, but
I've been trying to adjust it to accept 11+ as 10. Is there a way to add
that if C17 =11+, then treat it the same as C17 = 10?


How about:

Dim i As Integer
If Range("c17").Value < 10 Then
i = Range("c17").Value
Else
i = 10
End If

Select Case i
' and then your various Cases below


--
Gordon Rainsford

London UK