Bonjour à tous!

J'ai un petit problème tout simple mais dont je en me rappelle plus comment on fait...

J'aimerai simplifier mon code pour qu'il y ait moins de IF.
Mon code ici marche très bien, mais je le trouve long.
(j'ai bien essayé avec select case, mais j'arrive pas à le faire tourner)

En gros j'ai des lignes de conditions:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
If typeachat.Value = True And devise1.Value = True Then
prix1.Value = pricers(typeoption, s, k, rf, rd, sigma, maturité())
End If
 
If typeachat.Value = True And devise2.Value = True Then
prix1.Value = pricers(typeoption, s, k, rf, rd, sigma, maturité())
End If
 
 
If typevente.Value = True And devise1.Value = True Then
prix1.Value = pricers(typeoption, s, k, rf, rd, sigma, maturité())
End If
 
If typevente.Value = True And devise2.Value = True Then
prix1.Value = pricers(typeoption, s, k, rf, rd, sigma, maturité())
End If


Merci!