Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub MacroSelection()
- Range("A1:B6").Select
- Selection.Font.Bold = True
- Selection.Value = "Bonjour"
- Range("B6").Select
- Selection.Value = "Bonsoir"
- End Sub
- Sub MacroSecondDegré()
- Dim delta, resultat, resultat1, resultat2
- delta = Range("C2").Value * Range("C2").Value - 4 * Range("A2").Value * Range("E2")
- Range("G3").Value = delta
- If (delta = 0) Then
- resultat = -(Range("C2").Value / (2 * Range("A2").Value))
- MsgBox resultat
- End If
- If (delta > 0) Then
- resultat1 = (-Range("C2").Value + Sqr(delta)) / (2 * Range("A2").Value)
- resultat2 = (-Range("C2").Value - Sqr(delta)) / (2 * Range("A2").Value)
- Range("H3").Value = resultat1
- Range("I3").Value = resultat2
- End If
- End Sub
- Sub parite()
- If (Range("A10").Value Mod 2 = 0) Then
- resultat = "Pair"
- Else
- resultat = "Impair"
- End If
- MsgBox resultat
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement