Fusion de colonnes avec condition IF
Résolu/Fermé
Lils_Bis
Messages postés
57
Date d'inscription
lundi 4 avril 2016
Statut
Membre
Dernière intervention
28 décembre 2020
-
11 mai 2016 à 14:09
Lils_Bis Messages postés 57 Date d'inscription lundi 4 avril 2016 Statut Membre Dernière intervention 28 décembre 2020 - 17 mai 2016 à 11:30
Lils_Bis Messages postés 57 Date d'inscription lundi 4 avril 2016 Statut Membre Dernière intervention 28 décembre 2020 - 17 mai 2016 à 11:30
A voir également:
- Fusion de colonnes avec condition IF
- Recherchev avec condition si ✓ - Forum Excel
- Excel condition couleur - Guide
- If exist ✓ - Forum Autoit / batch
- Vba if not ✓ - Forum Excel
- Fusion pdf - Guide
1 réponse
Frenchie83
Messages postés
2239
Date d'inscription
lundi 6 mai 2013
Statut
Membre
Dernière intervention
28 janvier 2023
335
14 mai 2016 à 17:59
14 mai 2016 à 17:59
Bonjour
Si j'ai bien compris
Cdlt
Si j'ai bien compris
Sub FusionColonnes()
Application.ScreenUpdating = False
DerLig = Columns("B:C").Find("*", , , , xlByColumns, xlPrevious).Row
If [B1] = "Niveau1" Then
For i = 2 To DerLig
Cells(i, 2) = Cells(i, 2) & " " & Cells(i, 3)
Next i
Range("C2:C" & DerLig).ClearContents
End If
End Sub
Cdlt
17 mai 2016 à 11:30
Je te remercie de ta solution mais entre temps, j'en avais trouvé une moi-même, je la poste ici pour ceux que ça intéresse.
Derla = Range("A" & Rows.Count).End(xlUp).Row
Derlb = Range("B" & Rows.Count).End(xlUp).Row
If Derla > Derlb Then
derl = Derla
Else: derl = Derlb
End If
For i = 2 To derl
If Range("C1") = "Niveau1" Then
FusionFor = Range("C" & i) & Range("H" & i) & Range("M" & i) _
& Range("R" & i) & Range("S" & i) & Range("T" & i)
Range("C" & i) = FusionFor
End If
Next i
If Range("C1") = "Niveau1" Then
Range("H:H,M:M,R:R,S:S,T:T").Select
'Range("T1").Activate
Selection.Delete Shift:=xlToLeft
Range("C1") = "Niveau"
End If