funzioni booleane

esempio con solo excel o con VBA+excel

vedi doppio4.xls doppio4x.ppt doppio4x.htm

Private Sub CommandButton1_Click()
Rem doppio4
a = Cells(1, 1)
b = Cells(2, 1)
c = Cells(3, 1)
d = Cells(4, 1)
If a < b Then
ListBox1.AddItem (b - a)
Else
ListBox1.AddItem (a * b)
End If

If a < b Then
ListBox1.AddItem (a * b)
Else
ListBox1.AddItem (a - b)
End If
If a < b And b < c And c < d Then
ListBox1.AddItem ("vero")
End If
If a < b And b > c Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If a < b Or b > c Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If a > b Or b > c Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If Not a < b Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If
If Not a > b Then
ListBox1.AddItem ("vero")
Else
ListBox1.AddItem ("falso")
End If

If a < b Then
Cells(1, 3) = (b - a)
Else
Cells(1, 3) = (a * b)
End If

If a < b Then
Cells(2, 3) = (a * b)
Else
Cells(2, 3) = (a - b)
End If
If a < b And b < c And c < d Then
Cells(3, 3) = ("vero")
End If
If a < b And b > c Then
Cells(3, 3) = ("vero")
Else
Cells(4, 3) = ("falso")
End If
If a < b Or b > c Then
Cells(5, 3) = ("vero")
Else
Cells(5, 3) = ("falso")
End If
If a > b Or b > c Then
Cells(6, 3) = ("vero")
Else
Cells(6, 3) = ("falso")
End If
If Not a < b Then
Cells(7, 3) = ("vero")
Else
Cells(7, 3) = ("falso")
End If
If Not a > b Then
Cells(8, 3) = ("vero")
Else
Cells(8, 3) = ("falso")
End If
End Sub

Private Sub CommandButton2_Click()
ListBox1.Clear
End Sub


indice