Bonjour à toutes et à tous,
Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je
crois.
Le tableau se présente ainsi
txtH1 txtH2 txtH3
txtV1 x
txtV2
txtV3 x
Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit
txtV1-txtH2 et txtV3-txtH3.
ou la valeur : =INDIRECT("Feuil3!"&ADRESSE(EQUIV("txtV3";$A:$A;0);EQUIV("txtH3";1:1;0)))
isabelle
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit txtV1-txtH2 et txtV3-txtH3.
ou la valeur :
=INDIRECT("Feuil3!"&ADRESSE(EQUIV("txtV3";$A:$A;0);EQUIV("txtH3";1:1;0)))
isabelle
Bonjour à toutes et à tous,
Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je
crois.
Le tableau se présente ainsi
txtH1 txtH2 txtH3
txtV1 x
txtV2
txtV3 x
Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit
txtV1-txtH2 et txtV3-txtH3.
ou la valeur : =INDIRECT("Feuil3!"&ADRESSE(EQUIV("txtV3";$A:$A;0);EQUIV("txtH3";1:1;0)))
isabelle
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit txtV1-txtH2 et txtV3-txtH3.
Merci de m'aider
papou
Bonjour Si j'ai bien compris ? Par VBA (à adapter) : With Range("A1:D4") Set c = .Find("x", , xlValues, xlWhole, xlByRows) If Not c Is Nothing Then firstAddress = c.Address Do MsgBox Cells(1, c.Column).Value & " " & Cells(c.Row, 1) Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With
Cordialement Pascal
"René Delcourt" a écrit dans le message de news:
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit txtV1-txtH2 et txtV3-txtH3.
Merci de m'aider -- René Delcourt
Bonjour
Si j'ai bien compris ?
Par VBA (à adapter) :
With Range("A1:D4")
Set c = .Find("x", , xlValues, xlWhole, xlByRows)
If Not c Is Nothing Then
firstAddress = c.Address
Do
MsgBox Cells(1, c.Column).Value & " " & Cells(c.Row, 1)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Cordialement
Pascal
"René Delcourt" <rde@intras.ch> a écrit dans le message de news:
C61D05AE-51EA-4BFB-9F9D-BDCE079ED2EE@microsoft.com...
Bonjour à toutes et à tous,
Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je
crois.
Le tableau se présente ainsi
txtH1 txtH2 txtH3
txtV1 x
txtV2
txtV3 x
Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit
txtV1-txtH2 et txtV3-txtH3.
Bonjour Si j'ai bien compris ? Par VBA (à adapter) : With Range("A1:D4") Set c = .Find("x", , xlValues, xlWhole, xlByRows) If Not c Is Nothing Then firstAddress = c.Address Do MsgBox Cells(1, c.Column).Value & " " & Cells(c.Row, 1) Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With
Cordialement Pascal
"René Delcourt" a écrit dans le message de news:
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit txtV1-txtH2 et txtV3-txtH3.
Merci de m'aider -- René Delcourt
René Delcourt
Merci à tous 2. Ca fait plaisir de se faire épauler par 2 grands noms du forum! -- René Delcourt
Bonjour Si j'ai bien compris ? Par VBA (à adapter) : With Range("A1:D4") Set c = .Find("x", , xlValues, xlWhole, xlByRows) If Not c Is Nothing Then firstAddress = c.Address Do MsgBox Cells(1, c.Column).Value & " " & Cells(c.Row, 1) Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With
Cordialement Pascal
"René Delcourt" a écrit dans le message de news:
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit txtV1-txtH2 et txtV3-txtH3.
Merci de m'aider -- René Delcourt
Merci à tous 2.
Ca fait plaisir de se faire épauler par 2 grands noms du forum!
--
René Delcourt
Bonjour
Si j'ai bien compris ?
Par VBA (à adapter) :
With Range("A1:D4")
Set c = .Find("x", , xlValues, xlWhole, xlByRows)
If Not c Is Nothing Then
firstAddress = c.Address
Do
MsgBox Cells(1, c.Column).Value & " " & Cells(c.Row, 1)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Cordialement
Pascal
"René Delcourt" <rde@intras.ch> a écrit dans le message de news:
C61D05AE-51EA-4BFB-9F9D-BDCE079ED2EE@microsoft.com...
Bonjour à toutes et à tous,
Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je
crois.
Le tableau se présente ainsi
txtH1 txtH2 txtH3
txtV1 x
txtV2
txtV3 x
Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit
txtV1-txtH2 et txtV3-txtH3.
Merci à tous 2. Ca fait plaisir de se faire épauler par 2 grands noms du forum! -- René Delcourt
Bonjour Si j'ai bien compris ? Par VBA (à adapter) : With Range("A1:D4") Set c = .Find("x", , xlValues, xlWhole, xlByRows) If Not c Is Nothing Then firstAddress = c.Address Do MsgBox Cells(1, c.Column).Value & " " & Cells(c.Row, 1) Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstAddress End If End With
Cordialement Pascal
"René Delcourt" a écrit dans le message de news:
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider...je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x", soit txtV1-txtH2 et txtV3-txtH3.
'Renvoie le résultat dans une cellule Function Lineaire(champ As Range) temp = "" For lig = 1 To champ.Rows.Count For col = 1 To champ.Columns.Count If champ(lig, col) = "x" Then temp = temp & champ(lig, 1).Offset(0, -1) & "-" & champ(1, col).Offset(-1, 0) & " " End If Next col Next lig Lineaire = temp End Function
' Matricielle :Select champ et valider avec Maj+ctrl+entrée
Function Lineaire2(champ As Range) Dim temp() k = 0 For lig = 1 To champ.Rows.Count For col = 1 To champ.Columns.Count If champ(lig, col) = "x" Then k = k + 1 ReDim Preserve temp(1 To k) temp(k) = champ(lig, 1).Offset(0, -1) & "-" & champ(1, col).Offset(-1, 0) & " " End If Next col Next lig Lineaire2 = Application.Transpose(temp) End Function
ou la valeur : =INDIRECT("Feuil3!"&ADRESSE(EQUIV("txtV3";$A:$A;0);EQUIV("txtH3";1:1;0) ))
isabelle
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider... je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x ", soit txtV1-txtH2 et txtV3-txtH3.
Merci de m'aider
Bonjour,
http://cjoint.com/?ljk7zOKiUA
'Renvoie le résultat dans une cellule
Function Lineaire(champ As Range)
temp = ""
For lig = 1 To champ.Rows.Count
For col = 1 To champ.Columns.Count
If champ(lig, col) = "x" Then
temp = temp & champ(lig, 1).Offset(0, -1) & "-" & champ(1,
col).Offset(-1, 0) & " "
End If
Next col
Next lig
Lineaire = temp
End Function
' Matricielle :Select champ et valider avec Maj+ctrl+entrée
Function Lineaire2(champ As Range) Dim temp()
k = 0
For lig = 1 To champ.Rows.Count
For col = 1 To champ.Columns.Count
If champ(lig, col) = "x" Then
k = k + 1
ReDim Preserve temp(1 To k)
temp(k) = champ(lig, 1).Offset(0, -1) & "-" & champ(1,
col).Offset(-1, 0) & " "
End If
Next col
Next lig
Lineaire2 = Application.Transpose(temp)
End Function
ou la valeur :
=INDIRECT("Feuil3!"&ADRESSE(EQUIV("txtV3";$A:$A;0);EQUIV("txtH3";1:1;0) ))
isabelle
Bonjour à toutes et à tous,
Je me perds un peu avec index et equiv qui devraient pouvoir m'aider... je
crois.
Le tableau se présente ainsi
txtH1 txtH2 txtH3
txtV1 x
txtV2
txtV3 x
Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x ", soit
txtV1-txtH2 et txtV3-txtH3.
'Renvoie le résultat dans une cellule Function Lineaire(champ As Range) temp = "" For lig = 1 To champ.Rows.Count For col = 1 To champ.Columns.Count If champ(lig, col) = "x" Then temp = temp & champ(lig, 1).Offset(0, -1) & "-" & champ(1, col).Offset(-1, 0) & " " End If Next col Next lig Lineaire = temp End Function
' Matricielle :Select champ et valider avec Maj+ctrl+entrée
Function Lineaire2(champ As Range) Dim temp() k = 0 For lig = 1 To champ.Rows.Count For col = 1 To champ.Columns.Count If champ(lig, col) = "x" Then k = k + 1 ReDim Preserve temp(1 To k) temp(k) = champ(lig, 1).Offset(0, -1) & "-" & champ(1, col).Offset(-1, 0) & " " End If Next col Next lig Lineaire2 = Application.Transpose(temp) End Function
ou la valeur : =INDIRECT("Feuil3!"&ADRESSE(EQUIV("txtV3";$A:$A;0);EQUIV("txtH3";1:1;0) ))
isabelle
Bonjour à toutes et à tous, Je me perds un peu avec index et equiv qui devraient pouvoir m'aider... je crois. Le tableau se présente ainsi txtH1 txtH2 txtH3 txtV1 x txtV2 txtV3 x Je voudrais, en VBA ou en excel, récupérer les coordonnées des "x ", soit txtV1-txtH2 et txtV3-txtH3.