OVH Cloud OVH Cloud

plus simple ?

1 réponse
Avatar
reda
Bonjour,
Dans la colonne A, j'ai du texte du genre : Andre DUPONT;andre.dupont@wanadoo.
fr;;;;;;;;;;;;;;
POur extraire l'adresse mail, j'ai fait dans la col B :
=STXT(A1;TROUVE(";";A1;1)+1;CHERCHE(";";A1;TROUVE(";";A1;1)+1)-TROUVE(";";A1;1)-
1)
Y a-t-il plus simple ?
Merci d'avance
Reda

--
Use our news server 'news.foorum.com' from anywhere.
More details at: http://nnrpinfo.go.foorum.com/

1 réponse

Avatar
isabelle
bonjour reda,

il y a la fonction personnalisé MotCentre

=MotCentre(A1;";";".")

Function MotCentre(ByVal Chaine$, _
Optional SeparateurX$ = " ", Optional SeparateurY$ = " ")
Dim posX, posY, nbcarT, nbcarX, MotIntérieurDélimité_X
nbcarT = Len(Chaine)
nbcarX = Len(SeparateurX)
posX = Application.Search(SeparateurX, Chaine)
posY = Application.Search(SeparateurY, Chaine, posX)
MotIntérieurDélimité_X = Right(Chaine, nbcarT - posX - nbcarX + 1)
On Error GoTo fin
MotCentre = Left(MotIntérieurDélimité_X, posY - posX - nbcarX)
Exit Function
fin:
MotCentre = MotIntérieurDélimité_X
End Function

isabelle


Bonjour,
Dans la colonne A, j'ai du texte du genre : Andre DUPONT;
fr;;;;;;;;;;;;;;
POur extraire l'adresse mail, j'ai fait dans la col B :
=STXT(A1;TROUVE(";";A1;1)+1;CHERCHE(";";A1;TROUVE(";";A1;1)+1)-TROUVE(";";A1;1)-
1)
Y a-t-il plus simple ?
Merci d'avance
Reda

--
Use our news server 'news.foorum.com' from anywhere.
More details at: http://nnrpinfo.go.foorum.com/