Moderatori: Anthony47, Flash30005
alfrimpa ha scritto:Ma possono essere variabili solo le righe o anche le colonne?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ur As Long
Dim rng As Range
Dim attività As String
Dim scarto As Integer
ur = Cells(Rows.Count, "F").End(xlUp).Row
If Not Intersect(Target, Range("c4:f" & ur)) Is Nothing Then
Select Case Target.Column
Case Is = 3
scarto = -1
Case Is = 4
scarto = -2
Case Is = 5
scarto = -3
Case Is = 6
scarto = -4
End Select
attività = Target.Offset(0, scarto).Value
With Sheets("Foglio1").Range("k20:k24")
Set rng = .Find(What:=attività, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
rng.Offset(0, -2).Value = Target.Value
End If
End With
End If
End Sub
Torna a Applicazioni Office Windows
Eliminare righe diverse dalla prima data del mese Autore: dipdip |
Forum: Applicazioni Office Windows Risposte: 4 |
confrontare e evidenziare 2 fogli excel Autore: niccia |
Forum: Applicazioni Office Windows Risposte: 5 |
File batch per copiare file selezionato da menu contestuale Autore: valle1975 |
Forum: Programmazione Risposte: 3 |
Visitano il forum: Nessuno e 117 ospiti