Thread: IF Function
View Single Post
  #4   Report Post  
Ola
 
Posts: n/a
Default

I often use CHOOSE:

Example 1:
IF A4 = 1 Then 11
Else If A4 = 2 Then 22
Else If A4 = 3 Then 33
Else If A4 = 4 Then 44
=CHOOSE(A4,11,22,33,44)

Example 2:
IF AND(A4 = 1, A4 < 10) Then "1-9"
Else If AND(A4 = 10, A4 < 20) Then "10-19"
Else...
=CHOOSE(1 + A4 = 1 + A4 = 10 + A4 = 20), "Error", "1-9", "10-19", "20")


Ola Sandstrom