| | Post: 13 | Registrato il: 22/10/2021
| Città: ISEO | Età: 56 | Utente Junior | office 2010 | | OFFLINE |
|
26/10/2021 19:24 | |
ciao
nel range B60: F100
vorrei mettere una riga rossa
ogni 4 righe
ho provato con il registratore
ma mi e' uscito un listato molto molto lungo
so che che e' possibile con vba ma non sono capace.
se dovrebbe servire alleghero' il file
ciao
|
|
| | Post: 4.767 | Registrato il: 21/06/2013
| Città: NAPOLI | Età: 70 | Utente Master | Excel 365 | | OFFLINE |
|
26/10/2021 20:09 | |
Con il registratore di macro non si possono registrare i cicli.
Devi impostare un ciclo For che va da 60 a 100 impostando step 5 e all’interno del ciclo scrivere
vb Range(Cells(i, 2), Cells(i, 6)).Interior.ColorIndex = 6
i è la variabile per il ciclo For che va dichiarata.
Alfredo |
| | Post: 13 | Registrato il: 22/10/2021
| Città: ISEO | Età: 56 | Utente Junior | office 2010 | | OFFLINE |
|
26/10/2021 20:17 | |
ciao
[TESTO riga::vba Sub aaa()
For I = 60 To 100 Step 5
Range(Cells(I, 2), Cells(I, 6)).Interior.ColorIndex = 6
Next I
End Sub]
funziona ma mi son spegato male
a me serve il bordo rosso ogni 4
|
| | Post: 4.768 | Registrato il: 21/06/2013
| Città: NAPOLI | Età: 70 | Utente Master | Excel 365 | | OFFLINE |
|
26/10/2021 20:34 | |
Allega il file con la macro
Alfredo |
| | Post: 14 | Registrato il: 22/10/2021
| Città: ISEO | Età: 56 | Utente Junior | office 2010 | | OFFLINE |
|
26/10/2021 21:02 | |
|
| | Post: 952 | Registrato il: 24/06/2015
| Città: CATANIA | Età: 80 | Utente Senior | Excel2019 | | OFFLINE |
|
26/10/2021 21:15 | |
Ciao
Prova questa macro
Sub RigaRossa()
ur = Cells(Rows.Count, 2).End(xlUp).Row
For i = 60 To ur Step 4
With Range(Cells(i, 2), Cells(i, 6)).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
End With
Next i
End Sub
Fai sapere. Ciao,
Mario |
| | Post: 15 | Registrato il: 22/10/2021
| Città: ISEO | Età: 56 | Utente Junior | office 2010 | | OFFLINE |
|
26/10/2021 21:21 | |
ciao
tutto ok
grazie |
|
|