Moderatori: Anthony47, Flash30005
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ckArea As String, Cella As Range
'
ckArea = "C2:D1000" '<<< L'area delle colonne C:D da processare
If Not Application.Intersect(Target, Range(ckArea)) Is Nothing Then
For Each Cella In Application.Intersect(Target, Range(ckArea))
If Cells(Cella.Row, "C") <> "" And Cells(Cella.Row, "D") <> "" Then
Cells(Cella.Row, 2) = Date
Else
Cells(Cella.Row, 2).ClearContents
End If
Next Cella
Else
ckArea = "K2:P1000" '<<< L'area delle colonn K:P da processare
If Not Application.Intersect(Target, Range(ckArea)) Is Nothing Then
For Each Cella In Application.Intersect(Target, Range(ckArea))
If Cella.Value <> "" Then
Cells(Cella.Row, "Q") = Date
Else
If Application.WorksheetFunction.CountA(Application.Intersect(Rows(Cella.Row), Range(ckArea))) _
= 0 Then Cells(Cella.Row, "Q").ClearContents
End If
Next Cella
End If
End If
End Sub
Mi spiace, ma l'attivazione del DataModule sospende le gestione delle macro.Ciao Anthony, grazie mille per l'aiuto, premesso che non ho mai usato VBA, ho provato a fare dei tentativi nell'inserire le aree come da te evidenziato, ma non va.
[. . .]
Il file in oggetto (che ho allegato), ha una sola riga, ed io per inserire i nuovi cliente, uso il modulo di Excel che progressivamente mi compila anche le righe successive, formando l'elenco di tutti i clienti con le varie opzioni
Sub ApplicaMod()
'
For I = 3 To Cells(Rows.Count, "C").End(xlUp).Row
If Cells(I, 2) <> Cells(I, 3) And Cells(I, 3) <> "" Then
Sheets("PH").Range("Tabella8[[#Headers],[ID]]").Offset(Range("A1"), I - 2) = Cells(I, 3)
End If
Next I
Range(Cells(3, "C"), Cells(I, "C")).ClearContents
End Sub
Sub AggiungiRiga()
Dim I As Long, tRC As Long
'
Sheets("PH").ListObjects("Tabella8").ListRows.Add AlwaysInsert:=True
tRC = Sheets("PH").ListObjects("Tabella8").DataBodyRange.Rows.Count
For I = 4 To Cells(Rows.Count, "B").End(xlUp).Row
If Cells(I, "B") <> "" Then
Sheets("PH").Range("Tabella8[[#Headers],[Data Inserimento]]").Offset(tRC, I - 3).Value _
= Cells(I, "B")
End If
Next I
Range("B4").Resize(I, 1).ClearContents
End Sub
Torna a Applicazioni Office Windows
Disattivazione funzione " Telemetria " in W 10 Autore: mastino46 |
Forum: Software Windows Risposte: 5 |
Funzione CERCA ma con colonne dinamiche Autore: Paolo67met |
Forum: Applicazioni Office Windows Risposte: 2 |
Excel 2016 - Funzione SCARTO + INDIRETTO Autore: pl1957 |
Forum: Applicazioni Office Windows Risposte: 2 |
Nomogramma e funzione matematica in excel... Autore: Paolo67 |
Forum: Applicazioni Office Windows Risposte: 53 |
Visitano il forum: Nessuno e 11 ospiti