ho un problema
- Codice: Seleziona tutto
Sub Bari()
I = 4
On Error Resume Next
For Each Ambo In Range("S2:AA2")
Ambo.Offset(1, 0).Interior.ColorIndex = 4
Ambo.Interior.ColorIndex = 3
Range("D9:H150").Select
Selection.Find(What:=Ambo, After:=ActiveCell, LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
AAA = ActiveCell.Address
If ActiveCell.Address <> "$D$9" Then
ActiveCell.Interior.ColorIndex = I
Ambo.Interior.ColorIndex = 2
End If
I = I + 1
Next Ambo
Call Cagliari
End Sub
dovrei modificare in automatico il range D9:H150
cioe cambiare la cella H150 in base al valore di un altra cella A2
esempio Cella A2=25
il range D9:H25