Moderatori: Anthony47, Flash30005
HO GIA' IMPOSTATO IL TUTTO IN MODO CHE I DATI CHE MI SERVONO PRESENTI NELLA TABELLA, VENGANO AUTOMATICAMENTE RICOPIATI SU ALTRO FOGLIO EXCEL ALL'INTERNO DI UNA SORTA DI CEDOLINO (UNO PER CIASCUNO SOGGETTO IN ELENCO) IN DOPPIA COPIA.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myArea As String
'
myArea = "B3:D8" '<<< L'area con gli elenchi
'
If Not Application.Intersect(Target, Range(myArea)) Is Nothing Then
Application.EnableEvents = False
Call Presenti
Application.EnableEvents = True
End If
End Sub
Sub Presenti()
Dim Tab0 As Range, List0 As Range, Inter As Integer, J As Integer
'
Set List0 = Range("B3") '<<< Dove comincia la lista dei presenti/assenti
Set Tab0 = Range("L30") '<<< Dove comincera' la tabella creata
Inter = 5 '<<< La distanza in colonne tra le due colonne generate
Tab0.Offset(-1, 0).Resize(100, Inter + 3).Clear
Do
ocol = (J Mod 2) * 4
If List0.Offset(I, 0) <> "" Then
If List0.Offset(I, 2) = "presente" Then
Tab0.Offset(Int(J / 2) * Inter, ocol + 0) = List0.Offset(I, 0)
Tab0.Offset(Int(J / 2) * Inter, ocol + 1) = List0.Offset(I, 1)
Tab0.Offset(Int(J / 2) * Inter, ocol + 1).NumberFormat = "[$-410]dd-mmm-yy;@"
Tab0.Offset(Int(J / 2) * Inter, ocol + 2) = List0.Offset(I, 2)
o3Box Tab0.Offset(Int(J / 2) * Inter, ocol + 0)
J = J + 1
End If
Else
Exit Do
End If
I = I + 1
Loop
End Sub
Sub o3Box(ByRef myRan As Range)
Dim J As Integer, I As Integer
For J = 0 To 2
With myRan.Offset(-1, J).Resize(3, 1)
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
For I = 7 To 10
With .Borders(I)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Next I
End With
Next J
End Sub
Torna a Applicazioni Office Windows
Inserire dati filtrati da 2 file ad un terzo file Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 14 |
Inserire add.in nella barra di avvio veloce in excel 2003 Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 4 |
Excel: problema con date se devo unirle a testi Autore: valle1975 |
Forum: Applicazioni Office Windows Risposte: 5 |
Visitano il forum: Nessuno e 16 ospiti