ho il seguente problema ho in un Range Esempio D4:H9 una serie di numeri alcuni si ripetono
più di una volta e altri solo una. Io vorrei scrivere alcune righe sotto i numeri solo una volta e
raggruppandoli come in figura che allego.

Grazie
Francesco
Moderatori: Anthony47, Flash30005

Sub piop()
Dim CCC(1 To 90)
Set Sorg = Range("D4:H15") '<<< Area sorgente
Set Dest = Range("D25") '<<<< Prima cella di destinazione
'
Set SorgTL = Sorg.Range("A1")
For CCol = 0 To Sorg.Columns.Count - 1
CDop = 0
For CRow = 0 To Sorg.Rows.Count - 1
CCel = SorgTL.Offset(CRow, CCol)
If CCC(CCel) = 0 Then Dest.Offset(CRow - CDop, CCol) = CCel _
Else CDop = CDop + 1
CCC(CCel) = 1
Next CRow
Next CCol
End Sub
Sub ElimNumDoppi()
Dim VettN(90) As Integer
Range("D12:H17").ClearContents
For CC = 4 To 8
For RR = 5 To 10
VettN(Cells(RR, CC).Value) = VettN(Cells(RR, CC).Value) + 1
For CC2 = CC To 8
For RR2 = 12 To 17
If VettN(Cells(RR, CC).Value) = 1 And Cells(RR2, CC2).Value = "" Then
Cells(RR2, CC2).Value = Cells(RR, CC).Value
GoTo saltaRR
End If
Next RR2
Next CC2
saltaRR:
Next RR
Next CC
End SubSub collax()
CelleFree = "J1" '<< Colonna in cui sara' scritto il report
TuArea = "C1:G300" '<< Area con i dati
'
Compen = Range(TuArea).Column
Application.ScreenUpdating = False
For Each Cella In Range(TuArea)
Set CFormArea = Range(TuArea).Offset(Cella.Row).Resize(Range(TuArea).Rows.Count - Cella.Row +1)
If Application.WorksheetFunction.CountIf(CFormArea, Cella.Value) = 0 Then _
Range(CelleFree).Offset(Rows.Count - 1, Cella.Column - Compen).End(xlUp).Offset(1, 0) = Cella.Value
Next Cella
Application.ScreenUpdating = False
End SubTorna a Applicazioni Office Windows
| Excel apre solo una schermata bianca Autore: jameswilson |
Forum: Applicazioni Office Windows Risposte: 1 |
| 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: 7 |
Visitano il forum: Nessuno e 54 ospiti