Bonjour les experts
J'ai besoin de votre aide a propos d'une fonction à intégrée dans une formule
Ci-dessous la fonction
Function HtToLicence(Onglet As Integer, Col As Integer, Row As Integer) As String
Dim Cellule As Object, Textfields As Object, tmp As String
Dim i As Integer
'Spécifie la cellule A1 dans la 1ere Feuille
Cellule = ThisComponent.Sheets(Onglet).GetCellByPosition(Col, Row)
Textfields = Cellule.Textfields
'Vérifie s'il y a des liens dans la cellule
If Textfields.Count = 0 Then
HtToLicence = "?"
Else
tmp = Textfields.getByIndex(0).URL
HtToLicence = Right(tmp, Len(tmp) - InStr(tmp, "="))
' & _
' Chr(10) & oTextFields.getByIndex( 0 ).Representation
End If
End Function
Ci-dessous la formule qui doit renvoyer une valeur d'un site internet
=HTTOLICENCE(0;CELLULE("col";B3)-1;CELLULE("ligne";B3)-1)
Merci
en pièce jointe le fichier excel
Merci
J'ai besoin de votre aide a propos d'une fonction à intégrée dans une formule
Ci-dessous la fonction
Function HtToLicence(Onglet As Integer, Col As Integer, Row As Integer) As String
Dim Cellule As Object, Textfields As Object, tmp As String
Dim i As Integer
'Spécifie la cellule A1 dans la 1ere Feuille
Cellule = ThisComponent.Sheets(Onglet).GetCellByPosition(Col, Row)
Textfields = Cellule.Textfields
'Vérifie s'il y a des liens dans la cellule
If Textfields.Count = 0 Then
HtToLicence = "?"
Else
tmp = Textfields.getByIndex(0).URL
HtToLicence = Right(tmp, Len(tmp) - InStr(tmp, "="))
' & _
' Chr(10) & oTextFields.getByIndex( 0 ).Representation
End If
End Function
Ci-dessous la formule qui doit renvoyer une valeur d'un site internet
=HTTOLICENCE(0;CELLULE("col";B3)-1;CELLULE("ligne";B3)-1)
Merci
en pièce jointe le fichier excel
Merci