Microsoft 365 Liste de mots avec respect nb occurences

Ananke

XLDnaute Nouveau
Bonjour à tous,

Je suis bloquée sur un problème bête...

A partir de ce tableau :

Nb occurrence souhaitéMot à répéter
2IPC
1PPT
3AKL

Je veux générer ce résultat :

IPC
IPC
PPT
AKL
AKL
AKL

Est ce que vous avez une idée ?

Bonne journée
 

sylvanu

XLDnaute Barbatruc
Supporter XLD
Bonjour Ananke,
En PJ un essai avec :
VB:
Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("A1:B100")) Is Nothing Then
        If Target = "" Then Exit Sub
        DerLig = Range("A65500").End(xlUp).Row
        Range("E:E").ClearContents
        Nw = 1
        For i = 2 To DerLig
            Nb = Cells(i, "A")
            For Nfois = 1 To Nb
                Cells(Nw, "E") = Cells(i, "B")
                Nw = Nw + 1
            Next Nfois
        Next i
    End If
End Sub
La macro se déclenche lorsqu'on modifie la liste en colonnes A:B.
 

Pièces jointes

  • Ananke.xlsm
    14.7 KB · Affichages: 12

Discussions similaires

Statistiques des forums

Discussions
312 715
Messages
2 091 289
Membres
104 836
dernier inscrit
baxx86