| | Post: 3 | Registrato il: 26/10/2016
| Città: MILANO | Età: 61 | Utente Junior | excel 2013 | | OFFLINE | |
|
31/03/2018 23:08 | |
Ciao a tutti
non riesco a venirne a capo...allego file
in pratica ho una tabella A1...H1000
al verificarsi della condizione Vero nel range E1...H 1000
dovrei spostare la riga a fine tabella |
|
| | Post: 4.067 | Registrato il: 13/03/2012
| Città: LIVORNO | Età: 78 | Utente Master | 2010 | | OFFLINE | |
|
01/04/2018 06:43 | |
prova questa macro
Sub a()
LR = Cells(Rows.Count, "A").End(xlUp).Row + 2
riga = 1
While Cells(riga, 1) <> ""
Set found = Rows(riga).Find(True)
If Not found Is Nothing Then
Rows(riga).Cut
Rows(LR).Insert
Else
riga = riga + 1
End If
Wend
End Sub
----------
Win 10 - Excel 2010
allega un file di esempio, guadagnerai tempo tu e lo farai risparmiare a chi ti aiuta |
| | Post: 3 | Registrato il: 26/10/2016
| Città: MILANO | Età: 61 | Utente Junior | excel 2013 | | OFFLINE | |
|
01/04/2018 22:11 | |
Grazie 1000 Patel
domani la provero' in ufficio poi ti faccio sapere
ciao |
| | Post: 4 | Registrato il: 26/10/2016
| Città: MILANO | Età: 61 | Utente Junior | excel 2013 | | OFFLINE | |
|
03/04/2018 08:16 | |
Ciao
e grazie la macro funziona un ultima cosa ti chiedo se volessi spostare solo parte di riga cioe' da A a D con Rows(riga).Cut mi spodta tutta la riga |
| | Post: 4.068 | Registrato il: 13/03/2012
| Città: LIVORNO | Età: 78 | Utente Master | 2010 | | OFFLINE | |
|
03/04/2018 08:36 | |
Sub a()
LR = Cells(Rows.Count, "A").End(xlUp).Row + 2
riga = 1
While Cells(riga, 1) <> ""
Set found = Rows(riga).Find(True)
If Not found Is Nothing Then
Rows(riga).Cut
Rows(LR).Insert
Range("E" & LR - 1 & ":H" & LR - 1).ClearContents '<<<<<<
Else
riga = riga + 1
End If
Wend
End Sub [Modificato da patel45 03/04/2018 08:37]
----------
Win 10 - Excel 2010
allega un file di esempio, guadagnerai tempo tu e lo farai risparmiare a chi ti aiuta |
| | Post: 5 | Registrato il: 26/10/2016
| Città: MILANO | Età: 61 | Utente Junior | excel 2013 | | OFFLINE | |
|
03/04/2018 11:50 | |
Ciao,
grazie un ultima cosa devo mettere dei codici di controllo dopo la colonna H (i j k ) e vorrei non fossero spostati ho provato ad inserire una riga ma viene spostata |
| | Post: 4.069 | Registrato il: 13/03/2012
| Città: LIVORNO | Età: 78 | Utente Master | 2010 | | OFFLINE | |
|
03/04/2018 17:59 | |
allega un file più realistico con anche il risultato desiderato
----------
Win 10 - Excel 2010
allega un file di esempio, guadagnerai tempo tu e lo farai risparmiare a chi ti aiuta |
| | Post: 6 | Registrato il: 26/10/2016
| Città: MILANO | Età: 61 | Utente Junior | excel 2013 | | OFFLINE | |
|
03/04/2018 20:49 | |
ciao
allego il file
grazie
|
| | Post: 4.070 | Registrato il: 13/03/2012
| Città: LIVORNO | Età: 78 | Utente Master | 2010 | | OFFLINE | |
|
04/04/2018 09:15 | |
Ragionandoci un poco avresti potuto arrivarci da solo
Sub a()
LR = Cells(Rows.Count, "A").End(xlUp).Row + 2
riga = 1
While Cells(riga, 1) <> ""
Set found = Rows(riga).Find(True)
If Not found Is Nothing Then
Rows(riga).Cut
Rows(LR).Insert
Range("E" & LR - 1 & ":Z" & LR - 1).ClearContents '<<<<<<
Else
riga = riga + 1
End If
Wend
End Sub
----------
Win 10 - Excel 2010
allega un file di esempio, guadagnerai tempo tu e lo farai risparmiare a chi ti aiuta |
| | Post: 7 | Registrato il: 26/10/2016
| Città: MILANO | Età: 61 | Utente Junior | excel 2013 | | OFFLINE | |
|
04/04/2018 14:00 | |
Grazie 1000 Patel
cerchero' di capire quest'ultima istruzione
Range("E" & LR - 1 & ":Z" & LR - 1).ClearContents |
| | Post: 4.072 | Registrato il: 13/03/2012
| Città: LIVORNO | Età: 78 | Utente Master | 2010 | | OFFLINE | |
|
04/04/2018 17:23 | |
ho soltanto sostituito la H con la Z, in pratica copio tutta la riga e poi cancello da E a Z
----------
Win 10 - Excel 2010
allega un file di esempio, guadagnerai tempo tu e lo farai risparmiare a chi ti aiuta |
|
|