Compter le nombre de cellules

M

M.Charlotte

Guest
Bonjour,
Je cherche à pouvoir compter le nombre de cellules présente dans la colonne A, de A5 à A10, soit 6 celulles. Ces cellules sont à la fois vides, non vides, contenant du texte ou des chiffres.
Comment faire?
Merci d'avance pour votre aide,
M.Charlotte
 
@

@+Thierry

Guest
Coucou Moa, Bonsoir M.Charlotte, le Forum

Arf Moa, moi je n'ai pas compris comme çà !!! LoL

Moi, moi avoir compris que Charlotte voulait des statisque sur toutes les possibilité de type de valeurs rentrées dans ses cellules...

Cà donne ceci :

Sub CelluleFullStatistique()
Dim Plage As Range
Dim Total As Byte, NonVide As Byte, ValText As Byte, _
ValNume As Byte, ValForm As Byte, _
ValErre As Byte, ValVide As Byte, _
ValCond As Byte, ValComm As Byte, _
ValVali As Byte, valVisi As Byte

Set Plage = Sheets("Feuil1").Range("A5:A10")

Total = Plage.Count

On Error Resume Next
NonVide = Plage.SpecialCells(xlCellTypeConstants, 23).Count
ValVide = Plage.SpecialCells(xlCellTypeBlanks).Count
ValText = Plage.SpecialCells(xlCellTypeConstants, xlTextValues).Count
ValNume = Plage.SpecialCells(xlCellTypeConstants, xlNumbers).Count
ValForm = Plage.SpecialCells(xlCellTypeFormulas).Count
ValErre = Plage.SpecialCells(xlCellTypeFormulas, xlErrors).Count
ValCond = Plage.SpecialCells(xlCellTypeAllFormatConditions).Count
ValComm = Plage.SpecialCells(xlCellTypeComments).Count
ValVali = Plage.SpecialCells(xlCellTypeAllValidation).Count
valVisi = Plage.SpecialCells(xlCellTypeVisible).Count


MsgBox "La Zone contient " & Total & " cellules répartient comme suit : " & vbCrLf _
& vbTab & "Cellule Non Vide" & vbTab & vbTab & ": " & NonVide & vbCrLf _
& vbTab & "Cellule Etant vide" & vbTab & vbTab & ": " & ValVide & vbCrLf _
& vbTab & "Cellule Ayant du Texte" & vbTab & ": " & ValText & vbCrLf _
& vbTab & "Cellule Valeur Numérique" & vbTab & ": " & ValNume & vbCrLf _
& vbTab & "Cellule Avec Formule" & vbTab & ": " & ValForm & vbCrLf _
& vbTab & "Cellule Etant en Erreur" & vbTab & ": " & ValErre & vbCrLf _
& vbTab & "Cellule Format Conditionnel" & vbTab & ": " & ValCond & vbCrLf _
& vbTab & "Cellule Avec Commentaire" & vbTab & ": " & ValComm & vbCrLf _
& vbTab & "Cellule Critère de validation" & vbTab & ": " & ValVali & vbCrLf _
& vbTab & "Cellule Visible" & vbTab & vbTab & ": " & valVisi & vbCrLf


End Sub


Mais c'est ptet pas du tout çà la demande !! lol mais bon !!!

@+Thierry
Take it Easy Just For The Fun​
 

Discussions similaires

Statistiques des forums

Discussions
312 615
Messages
2 090 243
Membres
104 464
dernier inscrit
alzerco