Copier coller cellules d'une ligne selon critère

7essai.xlsm (17.23 Ko)

Bonjour

Facile ou non ?

Fichier joint

Merci d'avance

Nonno

Bonjour Nonno, le forum,

Un essai.....code à placer dans le module de la feuille concernée...

Private Sub Worksheet_Change(ByVal Target As Range)
 Dim tablo, tabloR(), k%, i

   tablo = Range("A1").CurrentRegion

  If Not Application.Intersect(Target, Range("I2")) Is Nothing Then
   Cancel = True
        k = 0
    For i = 1 To UBound(tablo, 1)
     If tablo(i, 6) = Target.Value Then
      ReDim Preserve tabloR(1 To 3, 1 To k + 1)
       tabloR(1, 1 + k) = tablo(i, 1)
       tabloR(2, 1 + k) = tablo(i, 3)
       tabloR(3, 1 + k) = tablo(i, 5)
        k = k + 1
     End If
    Next i
     Range("M1").CurrentRegion.ClearContents
    On Error Resume Next
     Range("M1").Resize(UBound(tabloR, 2), 3) = Application.Transpose(tabloR)
  End If
End Sub
14essaiv1.xlsm (20.17 Ko)

Cordialement,

IMPECABLE!

Merci et bon après midi

Cordialement

Nonno

Rechercher des sujets similaires à "copier coller ligne critere"