Ciao a tutti.
Ho un file excel con una riga dove inserisco la data e, nella colonna di fianco, il numero di giorni
Vorrei una macro che, vada a creare sotto la data, un numero di date orogressive pari al numero di giorni
Mi potete aiutare?
Grazie
Moderatori: Anthony47, Flash30005
Option Explicit
Sub Inserisci_Date()
Dim I As Integer
Range("A3:A" & Range("B2") + 2).Select
Selection.Insert Shift:=xlDown
Range("A3") = Range("A2")
For I = 4 To Range("B2") + 2
Cells(I, 1) = Cells(I - 1, 1) + 1
Next I
Range("A2").Select
End Sub
Cells(I, 3) = Range("C2")
Option Explicit
Sub Inserisci_Date()
Dim I As Integer
Range("A3:A" & Range("B2") + 2).Select
Selection.Insert Shift:=xlDown
Range("A3") = Range("A2")
For I = 4 To Range("B2") + 2
Cells(I, 1) = Cells(I - 1, 1) + 1
Cells(I, 3) = Range("C2")
Cells(I, 4) = Range("D2")
Cells(I, 5) = Range("E2")
Next I
Range("A2").Select
End Sub
Sub Inserisci_Date()
Dim I As Integer
Rows("3:" & Range("B2") + 2).Insert Shift:=xlDown
For I = 3 To Range("B2") + 2
Cells(I, 1) = Cells(I - 1, 1) + 1
Cells(I, 3) = Range("C2")
Cells(I, 4) = Range("D2")
Cells(I, 5) = Range("E2")
Next I
Range("A2").Select
End Sub
Torna a Applicazioni Office Windows
Excel: formula automatica per evidenziare prodotto scaduto Autore: gamma_ray |
Forum: Applicazioni Office Windows Risposte: 3 |
Salvare file excel in formato html escludendo le immagini Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 10 |
formula excel non visualizza risultato Autore: tommasog |
Forum: Applicazioni Office Windows Risposte: 6 |
Excel 2016 - Funzione SCARTO + INDIRETTO Autore: pl1957 |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Nessuno e 93 ospiti