macro avec 2 plages de cellule
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Sub Macroreajuste_tarif()
Dim Rep As Integer
Rep = MsgBox(" Alors OUI ou NON ? ", vbYesNo + vbQuestion, "Etes-vous sur de réajuster les tarifs")
If Rep = vbYes Then MsgBox ("Oui")
If Rep = vbNo Then Exit Sub
ActiveWorkbook.PrecisionAsDisplayed = True
taux = InputBox("votre taux")
Cells(1, 202).Value = (1 + (Val(taux) / 100))
Calculate
Application.ScreenUpdating = False
Range("A202").Select
Application.CutCopyMode = False
Selection.Copy
Range("A10:Q199").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Application.ScreenUpdating = True
ActiveWorkbook.PrecisionAsDisplayed = False
Range("S10:AF198").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Application.ScreenUpdating = True
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub |
voila ma maro a 2 plages mais elle secute mal
elle mais resultéat =0 dans toute les plages de A10 : Q199
et elle selectionne juste la plage S10: AF198 sans affecté le taux augmentation
Merci, si vous voulez le tableau origine nhesite pas