View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default if then statement with 16 constraints and 1 equation

How about the Select Case?
Sub CaseTest()
Select Case Range("A1").Value
Case 1
MsgBox "1"
Case 2
MsgBox "2"
Case Else
MsgBox "Not 1 or 2"
End Select
End Sub

Change the Cases as needed

Charles

Fish wrote:
Hello,

Is it possible to constuct a 16 constraint nested if then statement using
one equation as the control equation? Is there a better way to do this?
Please advise...

Regards,

Fish