Bonjour,
je cherche a copier coller une colonne dans un autre onglet.
Je copie colle dans l'onglet qui porte le nom de la ligne 9.
Mon fichier est trop lourd même en zip pour vous le faire partager malheureusement
Merci
update : j'ai enlevé les noms mais garder les prénoms
je cherche a copier coller une colonne dans un autre onglet.
Je copie colle dans l'onglet qui porte le nom de la ligne 9.
Code:
Sub Macro1()
Dim cmp As Integer, jb As Integer, nf As Integer, am As Integer, er As Integer, mb As Integer, hd As Integer, ag As Integer
cmp = jb = nf = am = em = hd = ag = 14
'***********************
'Organisation par noms
'***********************
Select Case (Cells(9, cmp).Value)
Case "Julie B"
Sheets("2012 FORECASTS TOTAL QUANTITE").Range(Cells(11, cmp), Cells(744, cmp)).Value = Sheets("Julie B").Range(Cells(11, jb), Cells(744, jb))
jb = jb + 1
cmp = cmp + 1
Case "Nathalie F"
Sheets("2012 FORECASTS TOTAL QUANTITE").Range(Cells(11, cmp), Cells(744, cmp)).Value = Sheets("Nathalie F").Range(Cells(11, nf), Cells(744, nf))
nf = nf + 1
cmp = cmp + 1
Case "Alexis M"
Sheets("2012 FORECASTS TOTAL QUANTITE").Range(Cells(11, cmp), Cells(744, cmp)).Value = Sheets("Alexis M").Range(Cells(11, am), Cells(744, am))
am = am + 1
cmp = cmp + 1
Case "Elodie R"
Sheets("2012 FORECASTS TOTAL QUANTITE").Range(Cells(11, cmp), Cells(744, cmp)).Value = Sheets("Elodie R").Range(Cells(11, er), Cells(744, er))
er = er + 1
cmp = cmp + 1
Case "Marie-Laetitia B"
Sheets("2012 FORECASTS TOTAL QUANTITE").Range(Cells(11, cmp), Cells(744, cmp)).Value = Sheets("Marie-Laetitia B").Range(Cells(11, mb), Cells(744, mb))
mb = mb + 1
cmp = cmp + 1
Case "Hélène D"
Sheets("2012 FORECASTS TOTAL QUANTITE").Range(Cells(11, cmp), Cells(744, cmp)).Value = Sheets("Hélène D").Range(Cells(11, hd), Cells(744, hd))
hd = hd + 1
cmp = cmp + 1
Case "Audrey G"
Sheets("2012 FORECASTS TOTAL QUANTITE").Range(Cells(11, cmp), Cells(744, cmp)).Value = Sheets("Audrey G").Range(Cells(11, ag), Cells(744, ag))
ag = ag + 1
cmp = cmp + 1
Case Else
End Select
End Sub
Mon fichier est trop lourd même en zip pour vous le faire partager malheureusement
Merci
update : j'ai enlevé les noms mais garder les prénoms
Dernière édition: