Sub a()
gotomax 1
End Sub
Private Sub gotomax(x As Long)
Dim p As Range
Set p = Columns(x).Cells.Find(Application.Max(Columns(x)))
Application.Goto p, True
End Sub
Application.Goto p, True
Sub a()
gotomax 2
End Sub
Sub b()
gotomax 4
End Sub
Private Sub gotomax(x As Long)
Dim p As Range
Set p = Columns(x).Cells.Find(Application.Max(Columns(x)))
Application.Goto p, True
End Sub
Sub a()
gotomax 2 'ok
End Sub
Sub b()
gotomax 4 'ok
End Sub
Private Sub gotomax(x As Long)
Dim p As Range, cMax As Range
Set p = Range(Cells(1, x), Cells(Rows.Count, x).End(3))
With p
Set cMax = p.Cells(Application.Match(Application.Max(p), p, 0))
If Not cMax Is Nothing Then
Application.Goto cMax, True
End If
End With
End Sub
Sub Plus_Grande_Valeur()
Dim Colonne As Long
Colonne = Application.InputBox("Recherche dans quelle Colonne ?", , , , , , , 1)
gotomax Colonne
End Sub
Si cela est possible, voir ci-dessousUne dernière chose, au lieu de rentrer le N° de la colonne
Il aurait beaucoup plus simple (pour moi! ) de rentrer la lettre de la colonne
Soit "B" au lieu de 2
Mais je suppose que ce n'est pas possible de le gérer dans ta fonction ?
A+
Sub Plus_Grande_Valeur()
Dim COLET$: COLET = InputBox("Lettre de la colonne?", "RECHERCHE DU MAX", "A")
gotomax Cells(1, COLET).Column
End Sub
Private Sub gotomax(x As Long)
Dim p As Range, cMax As Range
Set p = Range(Cells(1, x), Cells(Rows.Count, x).End(3))
With p
Set cMax = p.Cells(Application.Match(Application.Max(p), p, 0))
If Not cMax Is Nothing Then
Application.Goto cMax
End If
End With
End Sub
Cells(1, COLET).Column