Bonjour au Forum et à l'aide !
J'ai une colonne remplie de texte du style 96.78%
afin de faire une transfo rapide en nombre,
j'ai suivi la méthode du copier coller "multiplication" en ayant auparavant créer une colonne de 1 ...
Tout va bien c'est vraiment super
donc j'ai voulu l'enregistrer sous macro (en utilisant l'enregistreur)
et là tout va bien sauf qu'avec la macro,
le résultat final est toujours 1 dans toutes les celulles
que se passe t il ?
Merci de votre aide !!!
Sub Macro2()
'
' Macro2 Macro
'
'
Range("P10").Select
ActiveCell.FormulaR1C1 = "0.01"
Range("P10").Select
Selection.AutoFill Destination:=Range("P1050"), Type:=xlFillDefault
Range("P1050").Select
Range("H10:H50").Select
Range("H50").Activate
Selection.Copy
Range("P1050").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Style = "Percent"
Selection.NumberFormat = "0.0%"
Selection.NumberFormat = "0.00%"
Selection.Copy
Range("H10:H50").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0.0%"
Selection.NumberFormat = "0.00%"
Range("Q3").Select
End Sub
J'ai une colonne remplie de texte du style 96.78%
afin de faire une transfo rapide en nombre,
j'ai suivi la méthode du copier coller "multiplication" en ayant auparavant créer une colonne de 1 ...
Tout va bien c'est vraiment super
donc j'ai voulu l'enregistrer sous macro (en utilisant l'enregistreur)
et là tout va bien sauf qu'avec la macro,
le résultat final est toujours 1 dans toutes les celulles
que se passe t il ?
Merci de votre aide !!!
Sub Macro2()
'
' Macro2 Macro
'
'
Range("P10").Select
ActiveCell.FormulaR1C1 = "0.01"
Range("P10").Select
Selection.AutoFill Destination:=Range("P1050"), Type:=xlFillDefault
Range("P1050").Select
Range("H10:H50").Select
Range("H50").Activate
Selection.Copy
Range("P1050").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Style = "Percent"
Selection.NumberFormat = "0.0%"
Selection.NumberFormat = "0.00%"
Selection.Copy
Range("H10:H50").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0.0%"
Selection.NumberFormat = "0.00%"
Range("Q3").Select
End Sub