Belirli bir satırdaki maksimum değere ait sayının sütünuna tekabül eden hücreyi nasıl bulabirim?satırdan çektiğim maksimum sayının hangi sütundan geldiğini bulmaya çalışıyorum.şimdiden teşekkürler kolay gelsin...
Cözüm:
Maximum icin
Kod: Tümünü seç
Sub FindMaxValue()
Dim oRg As Range, iMax As Variant
Set oRg = Cells
'Finding the maximum value
'change Application.Max(oRg) into Application.Max(oRg) to find the maximum value
iMax = Application.Max(oRg)
'Select cell containing the min value
oRg.Find(What:=iMax, _
After:=oRg.Range("A1"), _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False _
).Select
'Change selected cell format
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent3
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'Displaying min value info
With Selection
MsgBox "Max value : " & iMax & vbCrLf & _
"Cell position " & vbCrLf & _
"Row : " & .Row & vbCrLf & _
"Column : " & .Column
End With
End SubKod: Tümünü seç
Sub FindMinValue()
Dim oRg As Range, iMin As Variant
Set oRg = Cells
'Finding the minimum value
'change Application.Min(oRg) into Application.Max(oRg) to find the maximum value
iMin = Application.Min(oRg)
'Select cell containing the min value
oRg.Find(What:=iMin, _
After:=oRg.Range("A1"), _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False _
).Select
'Change selected cell format
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent3
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'Displaying min value info
With Selection
MsgBox "Min value : " & iMin & vbCrLf & _
"Cell position " & vbCrLf & _
"Row : " & .Row & vbCrLf & _
"Column : " & .Column
End With
End Sub

ceviri ve düzenleme velociraptor

