Moderatori: Anthony47, Flash30005
Poi però gli devo dire che quanto sopra va bene, sempre a parità di nome, dove le prime due lettere di Foglio2 cella C2:F2 sono contenute in Foglio1 colonna C cella "offset(0,1)" (Causali).
Sub SmazzaF1_a_F2()
Dim F1Arr, cNom As String, LastB As Long
Dim I As Long, J As Long, K As Long
F1Arr = Sheets("Foglio1").Range("A1").CurrentRegion.Value
Sheets("Foglio2").Select
LastB = Cells(Rows.Count, "B").End(xlUp).Row
Range("C3:F" & LastB - 1).ClearContents
For I = 3 To LastB Step 2
cNom = UCase(Cells(I, "B"))
If Len(cNom) > 0 Then
For J = 2 To UBound(F1Arr)
If UCase(F1Arr(J, 2)) = cNom Then
For K = 3 To 6
If InStr(1, F1Arr(J, 3), Cells(2, K), vbTextCompare) > 0 Then
If Cells(I + 1, K) = "" Then
Cells(I, K) = F1Arr(J, 1)
Cells(I + 1, K) = F1Arr(J, 4)
End If
End If
Next K
End If
Next J
End If
Next I
End Sub
.. il povero Cecc che ha versato 2 Acconti ..
.. ma tu sei veramente ancora su XP+2003?
If InStr(1, F1Arr(J, 3), Cells(2, K), vbTextCompare) > 0 Then
' If Cells(I + 1, K) <> "" Then
Cells(I, K) = F1Arr(J, 1)
Cells(I + 1, K) = Cells(I + 1, K) + F1Arr(J, 4)
' End If
End If
Private Sub Worksheet_Activate()
Call SmazzaF1_a_F2
End Sub
Piuttosto esegui la macro tutte le volte che attivi Foglio2
Torna a Applicazioni Office Windows
Inserire dati filtrati da 2 file ad un terzo file Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 14 |
confrontare e evidenziare 2 fogli excel Autore: niccia |
Forum: Applicazioni Office Windows Risposte: 7 |
Perchè l'importazione dati con Selenium non fuziona? Autore: aggittoriu |
Forum: Applicazioni Office Windows Risposte: 7 |
Visitano il forum: Nessuno e 30 ospiti