cioè ad ogni fine mese 1 poi 2,3 etc.etc.
con una macro,in modo che posso scegliere se fine o inizio mese
allego foto dei riferimenti

seconda foto, a così

Moderatori: Anthony47, Flash30005


Sub TrovaEstr()
UR = Worksheets("Archivio").Range("A" & Rows.Count).End(xlUp).Row
Range("B3:B10000").ClearContents
Dim Vs(4) As Integer
Dim SR(4) As Integer
MM = ""
CS = 0
For RR = 3 To UR
If Len(Range("C" & RR).Value) > 9 Then
If Month(Range("C" & RR).Value) <> MM Then
For RS = 1 To 4
If Range("J2").Value = RS Then
CS = CS + 1
Range("B" & RR).Value = CS
RR = RR - 1
End If
RR = RR + 1
Next RS
MM = Month(Range("C" & RR).Value)
End If
End If
Next RR
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$J$2" Then Exit Sub
TrovaEstr
End Sub
=SE(MESE(C9)=MESE(C10);"";MAX($B$3:$B8)+1)=SE(MESE(C9)=MESE(C10);"";MESE(C9))=SE(VAL.NUMERO(C9);C9;DATA.VALORE(C9))Sub TrovaEstr()
UR = Worksheets("Archivio").Range("A" & Rows.Count).End(xlUp).Row
Range("B3:B10000").ClearContents
MM = ""
CS = 0
For RR = 3 To UR
If Len(Range("C" & RR).Value) > 9 Then
If Month(Range("C" & RR).Value) <> MM Then
If Range("J2").Value <> 4 Then
For RS = 1 To 4
If Range("J2").Value = RS Then
CS = CS + 1
Range("B" & RR).Value = CS
RR = RR - 1
End If
RR = RR + 1
Next RS
MM = Month(Range("C" & RR).Value)
Else
If MM <> "" Then
CS = CS + 1
Range("B" & RigaP).Value = CS
End If
End If
Else
RigaP = RR
End If
MM = Month(Range("C" & RR).Value)
End If
Next RR
End Sub
Torna a Applicazioni Office Windows
| Macro modifica date scelta periodo Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 11 |
| Excel: problema con date se devo unirle a testi Autore: valle1975 |
Forum: Applicazioni Office Windows Risposte: 7 |
| Eliminare righe diverse dalla prima data del mese Autore: dipdip |
Forum: Applicazioni Office Windows Risposte: 4 |
| Automatizzare numero settimane nel mese di un anno Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 3 |
| Collegamento che punta a una qualunque fine colonna Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 7 |
Visitano il forum: Nessuno e 24 ospiti