Recap Fond JAUNE

Bonjour,

Un petit coup de pouce svp.

Je souhaiterai faire une récapitulation de ma feuille WA s'étendant de H1 a BB2500

si le fond est Jaune aléatoirement positionné des donnés en H1 L1 P1 T1 ...

si donnés = EXCLU = terminés la collecte d'info

Merci d'avance

Cordialement

11recapfondjaune.zip (97.98 Ko)

Bonjour,

à tester,

Sub test_transfert()
Set sh1 = Sheets("WA")
Set sh2 = Sheets("RecapJaune")
DerCol1 = sh1.Cells(1, Columns.Count).End(xlToLeft).Column
LastRow2 = sh2.Cells(Rows.Count, 1).End(xlUp).Row + 1

For col = 8 To DerCol1 Step 4
LastRow1 = sh1.Cells(Rows.Count, col).End(xlUp).Row
  For lign = 2 To LastRow1
   If sh1.Cells(lign, col).Interior.ColorIndex = 6 Then
    sh2.Cells(LastRow2, 1).Value = sh1.Cells(1, col).Value
    sh2.Cells(LastRow2, 2).Value = sh1.Cells(lign, col).Value
    sh2.Cells(LastRow2, 3).Value = sh1.Cells(lign, col + 1).Value
    sh2.Cells(LastRow2, 4).Value = sh1.Cells(lign, col + 2).Value
    LastRow2 = sh2.Cells(Rows.Count, 1).End(xlUp).Row + 1
   End If
  Next
Next
End Sub

Bravo Merci

c exactement cela

pour Exclu je l'efface manuellement c'est deja top comme ça

Merci

Rechercher des sujets similaires à "recap fond jaune"