Ciao Ramset
Non ho capito dove vuoi mettere il valore 10 (o -10 se già ce l'hai) comunque ti invio queste macro che hanno due funzioni
la prima inserisce nella colonna A del foglio3 il valore massimo della corrispondente riga del foglio1 (possono essere anche più righe e non necessariamente avere sempre e solo 10 colonne)
la seconda ti fornisce con un mesaggio (che puoi sostituire con qualsiasi altro comando) sia la riga, la colonna e l'indirizzo della cella del foglio1 che ha quel determinato valore del foglio3
(volendo il foglio 3 diventa inutile se occorre solo per questo)
- Codice: Seleziona tutto
Sub ValorMax()
URR = Worksheets("Foglio1").Range("A" & Rows.Count).End(xlUp).Row
UC = Worksheets("Foglio1").Range("A1").End(xlToRight).Column
For I = 1 To URR
ValoreMax = 0
For CC = 1 To UC
Valore = Cells(I, CC).Value
If Valore > ValoreMax Then ValoreMax = Valore
Next CC
Worksheets("Foglio3").Cells(I, 1).Value = ValoreMax
Next I
End Sub
Sub CercaVal()
URR = Worksheets("Foglio1").Range("A" & Rows.Count).End(xlUp).Row
UC = Worksheets("Foglio1").Range("A1").End(xlToRight).Column
For I = 1 To URR
VS1 = Worksheets("Foglio3").Range("A" & I).Value
With Worksheets("Foglio1").Range(Cells(I, 1), Cells(I, UC))
Set C = .Find(VS1, LookIn:=xlValues, LookAt:=xlWhole)
If Not C Is Nothing Then
firstAddress = C.Address
RC = C.Row
CC = C.Column
AC = C.Address
MsgBox "Riga " & RC & " - Colonna " & CC & " - Indirizzo " & AC
Do
Set C = .FindNext(C)
If firstAddress = C.Address Then Exit Do
RC = C.Row
CC = C.Column
AC = C.Address
MsgBox "Riga " & RC & " - Colonna " & CC & " - Indirizzo " & AC
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
End With
Next I
End Sub
Fai sapere
Ciao