tjs pr la conversion

  • Initiateur de la discussion Olivier
  • Date de début
O

Olivier

Guest
Voici la fomrule que k'ai trouvee pr convertir.Seulement j'y rencontre encore qq problemes.Pr les cellules comportant des formules du genre =250000+25
soit il me le fait bien, soit pas du tout, soit il converti 2 fois.

J'espere que vous pourrez m'aider.Car la moi je suis un peu perdu je l'avoue.Pr le momet il me met memoire insuffisante qd je veux convertir une selection. Enfin voici la formule:

Sub Frf2Eur()
Set PlageCellules = Selection
If PlageCellules.Areas.Count = 1 Then
For i = 1 To PlageCellules.Count
If Left$(PlageCellules(i).FormulaArray, 1) = "=" Then
PlageCellules(i).ClearComments
PlageCellules(i).NumberFormat = "# ##0.00"
Else
If EstValeur(PlageCellules(i).Value) Then
PlageCellules(i).ClearComments
PlageCellules(i) = ConvTronq(PlageCellules(i) / 40.3399)
PlageCellules(i).NumberFormat = "# ##0.00 "
Else
PlageCellules(i).ClearComments
End If
End If
Next i
Else
For Each PlageSimple In PlageCellules.Areas
For i = 1 To PlageSimple.Count
If Left$(PlageSimple(i).FormulaArray, 1) = "=" Then
PlageSimple(i).ClearComments
PlageSimple(i).NumberFormat = "# ##0.00"
Else
If EstValeur(PlageSimple(i).Value) Then
PlageSimple(i).ClearComments
PlageSimple(i) = ConvTronq(PlageSimple(i) / 40.3399)
PlageSimple(i).NumberFormat = "# ##0.00"
Else
PlageSimple(i).ClearComments
End If
End If
Next i
Next
End If
Cells.Find(What:="=", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
For Each cl In Selection
If InStr(1, cl.Formula, "SUM") > 0 Then
Cells.Find(What:="=", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Else
modif = ActiveCell.Formula
modif = Replace(modif, "=", "=0.024789352477323939821*")
ActiveCell = modif
End If
Next cl
End Sub
 

Discussions similaires

Réponses
4
Affichages
165