Bonjour à tous,
Je pense avoir un problème de syntaxe, ou alors la propriété Cells ne l'autorise pas.
Merci d'avance pour vos conseils.
Avec 2 plage ça fonctionne :
NbCelVides = Range(Cells(13, 2) & ":" & Cells(lastrowWsDSINP & 6), Cells(13, 8) & ":" & Cells(lastrowWsDSINP & 8)).SpecialCells(xlCellTypeBlanks).Count
En ajoutant une nouvelle plage, ça ne fonctionne plus :
NbCelVides = Range(Cells(13, 2) & ":" & Cells(lastrowWsDSINP & 6), Cells(13, 8) & ":" & Cells(lastrowWsDSINP & 8), Cells(13, 62) & ":" & Cells(lastrowWsDSINP & 62)).SpecialCells(xlCellTypeBlanks).Count
En utilisant Range, le nombre de plages ne pose pas de problème :
NbCelVides = Range("B13:F" & lastrowWsDSINP & "," & "H13:H" & lastrowWsDSINP & "," & "BJ13:BJ" & lastrowWsDSINP & "," & "BL13:BL" & lastrowWsDSINP & "," & "BN13:BN" & lastrowWsDSINP & "," & "BP13:BP" & lastrowWsDSINP & "," & "BX13:BX" & lastrowWsDSINP & "," & "CG13:CG" & lastrowWsDSINP & "," & "CM13:CM" & lastrowWsDSINP).SpecialCells(xlCellTypeBlanks).Count
Bien cordialement,
Dan