Moderatori: Anthony47, Flash30005
=SE(CONTA.SE($U2:$AN2;A$1)>0;A$1;"")
da questa situazione iniziale
[. . . ]
vorrei avere questa situazione finale
[. . . ]
praticamente vorrei ordinare e spostare i valori di riga 2 in modo da allinearli con i corrispondenti valori di riga 1.
Sub myFab()
Dim WArr, LC2 As Long, I As Long, myMatch
'
LC2 = Cells(2, Columns.Count).End(xlToLeft).Column
WArr = Range("A2").Resize(1, LC2).Value
Range("A2").Resize(1, LC2).ClearContents
For I = LBound(WArr, 2) To UBound(WArr, 2)
myMatch = Application.Match(WArr(1, I), Range("1:1"), 0)
If Not IsError(myMatch) Then
Cells(2, myMatch) = WArr(1, I)
End If
Next I
'
End Sub
Sub myFab2()
Dim WArr, LC2 As Long, I As Long, myMatch, R As Long
'
For R = 2 To Cells(Rows.Count, 1).End(xlUp).Row
LC2 = Cells(R, Columns.Count).End(xlToLeft).Column
WArr = Range("A" & R).Resize(1, LC2).Value
Range("A" & R).Resize(1, LC2).ClearContents
For I = LBound(WArr, 2) To UBound(WArr, 2)
myMatch = Application.Match(WArr(1, I), Range("1:1"), 0)
If Not IsError(myMatch) Then
Cells(R, myMatch) = WArr(1, I)
End If
Next I
Next R
'
End Sub
Torna a Applicazioni Office Windows
Ordinare colonne sulla stessa riga se stesso contenuto Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 10 |
Formattzione valori con simbolo triangolini colorati Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 11 |
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 10 ospiti