aducloux
Messages postés33Date d'inscriptionlundi 25 février 2008StatutMembreDernière intervention20 juin 2008
-
14 mai 2008 à 15:53
mortalino
Messages postés6786Date d'inscriptionvendredi 16 décembre 2005StatutMembreDernière intervention21 décembre 2011
-
14 mai 2008 à 16:28
bonjour a tous,
je recherche l'équivalent de cette fonction mais en langage usuel....
"=IF(ISTEXT(RC[-7]),1,2)" --------->(si le contenu de la cellule est du texte)
je m explique : je voudrais avoir la macro de cette macro qui doit etre du style :
Public Function TypeCell(MyCell As Range) As String
If IsEmpty(MyCell) Then
TypeCell = "Vide"
ElseIf Application.IsText(MyCell) Then
TypeCell = "Texte"
ElseIf Application.IsLogical(MyCell) Then
TypeCell = "Logique"
ElseIf Application.IsErr(MyCell) Then
TypeCell = "Erreur"
ElseIf IsDate(MyCell) Then
TypeCell = "Date"
ElseIf IsNumeric(MyCell) Then
TypeCell = "Nombre"
End If
End Function
Private Sub EXEMPLE()
MsgBox TypeCell(Range("A4"))
MsgBox TypeCell(Sheets(2).Range("A4"))
End Sub
~
<small>[code.aspx?ID=39466 Mortalino] ~
Colorisation automatique</small>