bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et rubrique
qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est pas
efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et rubrique
qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est pas
efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et rubrique
qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est pas
efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Bonsoir,
Essaie ces formules et dis-moi si tu obtiens le résultat attendu.
Sur la feuille récap global :
1) Sélectionne B2:P21, entre cette formule
=SOMMEPROD((récap!$A$2:$A$215=$A2)*(récap!B2:B215))
et valide par Ctrl+Entrée.
2) Entre cette formule =SOMME(B2:P2) en Q2 et recopie jusqu'en Q21.
Serge
"ptck" a écrit dans le message de news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Bonsoir,
Essaie ces formules et dis-moi si tu obtiens le résultat attendu.
Sur la feuille récap global :
1) Sélectionne B2:P21, entre cette formule
=SOMMEPROD((récap!$A$2:$A$215=$A2)*(récap!B2:B215))
et valide par Ctrl+Entrée.
2) Entre cette formule =SOMME(B2:P2) en Q2 et recopie jusqu'en Q21.
Serge
"ptck" <nospamptck@neuf.fr> a écrit dans le message de news:
e1wqB456JHA.5524@TK2MSFTNGP05.phx.gbl...
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Bonsoir,
Essaie ces formules et dis-moi si tu obtiens le résultat attendu.
Sur la feuille récap global :
1) Sélectionne B2:P21, entre cette formule
=SOMMEPROD((récap!$A$2:$A$215=$A2)*(récap!B2:B215))
et valide par Ctrl+Entrée.
2) Entre cette formule =SOMME(B2:P2) en Q2 et recopie jusqu'en Q21.
Serge
"ptck" a écrit dans le message de news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
je voulais savoir si on pouvait optimiser le code
merci
"garnote" a écrit dans le message de news:Bonsoir,
Essaie ces formules et dis-moi si tu obtiens le résultat attendu.
Sur la feuille récap global :
1) Sélectionne B2:P21, entre cette formule
=SOMMEPROD((récap!$A$2:$A$215=$A2)*(récap!B2:B215))
et valide par Ctrl+Entrée.
2) Entre cette formule =SOMME(B2:P2) en Q2 et recopie jusqu'en Q21.
Serge
"ptck" a écrit dans le message de news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
je voulais savoir si on pouvait optimiser le code
merci
"garnote" <garnote3@videotron.ca> a écrit dans le message de news:
uEJtEh66JHA.1424@TK2MSFTNGP02.phx.gbl...
Bonsoir,
Essaie ces formules et dis-moi si tu obtiens le résultat attendu.
Sur la feuille récap global :
1) Sélectionne B2:P21, entre cette formule
=SOMMEPROD((récap!$A$2:$A$215=$A2)*(récap!B2:B215))
et valide par Ctrl+Entrée.
2) Entre cette formule =SOMME(B2:P2) en Q2 et recopie jusqu'en Q21.
Serge
"ptck" <nospamptck@neuf.fr> a écrit dans le message de news:
e1wqB456JHA.5524@TK2MSFTNGP05.phx.gbl...
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
je voulais savoir si on pouvait optimiser le code
merci
"garnote" a écrit dans le message de news:Bonsoir,
Essaie ces formules et dis-moi si tu obtiens le résultat attendu.
Sur la feuille récap global :
1) Sélectionne B2:P21, entre cette formule
=SOMMEPROD((récap!$A$2:$A$215=$A2)*(récap!B2:B215))
et valide par Ctrl+Entrée.
2) Entre cette formule =SOMME(B2:P2) en Q2 et recopie jusqu'en Q21.
Serge
"ptck" a écrit dans le message de news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et rubrique
qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est pas
efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et rubrique
qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est pas
efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et rubrique
qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est pas
efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" <nospamptck@neuf.fr> a écrit dans le message de
news:e1wqB456JHA.5524@TK2MSFTNGP05.phx.gbl...
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" <charabeuh@orenge.fr> a écrit dans le message de news:
%23YhjAa86JHA.5756@TK2MSFTNGP02.phx.gbl...
Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" <nospamptck@neuf.fr> a écrit dans le message de
news:e1wqB456JHA.5524@TK2MSFTNGP05.phx.gbl...
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Merci encore
mais la macro de MichDenis me fait des totaux erronés sur certain nom
dans l'exemple que j'ai envoyé çà marche mais avec mon tableau initial
certain noms sont erronés
je cherche!!
ptck
"garnote" a écrit dans le message de news:Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Merci encore
mais la macro de MichDenis me fait des totaux erronés sur certain nom
dans l'exemple que j'ai envoyé çà marche mais avec mon tableau initial
certain noms sont erronés
je cherche!!
ptck
"garnote" <garnote3@videotron.ca> a écrit dans le message de news:
uvq4BW96JHA.728@TK2MSFTNGP05.phx.gbl...
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" <charabeuh@orenge.fr> a écrit dans le message de news:
%23YhjAa86JHA.5756@TK2MSFTNGP02.phx.gbl...
Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" <nospamptck@neuf.fr> a écrit dans le message de
news:e1wqB456JHA.5524@TK2MSFTNGP05.phx.gbl...
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Merci encore
mais la macro de MichDenis me fait des totaux erronés sur certain nom
dans l'exemple que j'ai envoyé çà marche mais avec mon tableau initial
certain noms sont erronés
je cherche!!
ptck
"garnote" a écrit dans le message de news:Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" <charabeuh@orenge.fr> a écrit dans le message de news:
%23YhjAa86JHA.5756@TK2MSFTNGP02.phx.gbl...
Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" <nospamptck@neuf.fr> a écrit dans le message de
news:e1wqB456JHA.5524@TK2MSFTNGP05.phx.gbl...
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" <charabeuh@orenge.fr> a écrit dans le message de news:
%23YhjAa86JHA.5756@TK2MSFTNGP02.phx.gbl...
Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" <nospamptck@neuf.fr> a écrit dans le message de
news:e1wqB456JHA.5524@TK2MSFTNGP05.phx.gbl...
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls
Et si tu me permets :
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Dim F1 As Worksheet, F2 As Worksheet
Set F1 = Sheets("récap global")
Set F2 = Sheets("récap")
With F1
.Activate
.Range("A1").CurrentRegion.ClearContents
SourceAdresse = F2.Name & "!" & _
F2.Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
.Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = .Range("A1"). _
CurrentRegion.Columns.Count
LastRow = .Range("A1"). _
CurrentRegion.Rows.Count
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
.Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
.Cells(1, LastCol).Value = "Total"
End With
Application.CutCopyMode = False
End Sub
Serge
"Charabeuh" a écrit dans le message de news:
%Bonjour,
Une autre piste:
Sub Recap2()
Dim LastCol, LastRow, SourceAdresse
Sheets("récap global").Range("A1").CurrentRegion.ClearContents
SourceAdresse = Sheets("récap").Name & "!" & _
Sheets("récap").Range("A1").CurrentRegion. _
Address(ReferenceStyle:=xlR1C1)
Sheets("récap global").Range("A1").Consolidate Sources:= _
SourceAdresse, Function:=xlSum, _
TopRow:=True, LeftColumn:=True, CreateLinks:úlse
LastCol = Sheets("récap global").Range("A1"). _
CurrentRegion.Columns.Count
LastRow = Sheets("récap global").Range("A1"). _
CurrentRegion.Rows.Count
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).FormulaR1C1 = _
"=SUM(RC[-" & (LastCol - 1) & "]:RC[-1])"
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).Copy
Sheets("récap global").Range(Cells(2, LastCol), _
Cells(LastRow, LastCol)).PasteSpecial Paste:=xlPasteValues
Sheets("récap global").Cells(1, LastCol).Value = "Total"
Application.CutCopyMode = False
End Sub
"ptck" a écrit dans le message de
news:
bonsoir
Dans le fichier joint j'ai une macro qui fait le total par nom et
rubrique qui marche
mais elle est un peu longue. Débutant en macro, je pense qu'elle n'est
pas efficace
peut elle être améliorée?
Merci de votre aide
ptck
http://www.cijoint.fr/cjlink.php?file=cj200906/cijJ3Zrdf9.xls