Condividi:        

Excel, cella con data automatica ad ogni modifica file

Vuoi potenziare i tuoi documenti Word? Non sai come si fa una macro in Excel? Devi creare una presentazione in PowerPoint?
Oppure sei passato a OpenOffice e non sei sicuro di come lavorare al meglio?

Moderatori: Anthony47, Flash30005

Re: Excel, cella con data automatica ad ogni modifica file

Postdi alfrimpa » 13/04/17 12:33

Ma possono essere variabili solo le righe o anche le colonne?
Alfredo

Win7 + Office 2007
Avatar utente
alfrimpa
Utente Senior
 
Post: 1201
Iscritto il: 30/12/13 17:01
Località: Napoli

Sponsor
 

Re: Excel, cella con data automatica ad ogni modifica file

Postdi AciGatsu » 20/04/17 13:22

alfrimpa ha scritto:Ma possono essere variabili solo le righe o anche le colonne?


Ciao,

varia solamente il numero di righe .

Grazie!
AciGatsu
Newbie
 
Post: 8
Iscritto il: 11/04/17 10:15

Re: Excel, cella con data automatica ad ogni modifica file

Postdi alfrimpa » 20/04/17 14:37

Ciao

Prova con questo codice

Codice: Seleziona tutto
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
Alfredo

Win7 + Office 2007
Avatar utente
alfrimpa
Utente Senior
 
Post: 1201
Iscritto il: 30/12/13 17:01
Località: Napoli

Precedente

Torna a Applicazioni Office Windows


Topic correlati a "Excel, cella con data automatica ad ogni modifica file":


Chi c’è in linea

Visitano il forum: papiriof e 48 ospiti