Pagina precedente | 1 | Pagina successiva
Vota | Stampa | Notifica email    
Autore

Cancella la riga in base al comando

Ultimo Aggiornamento: 24/08/2019 14:32
Post: 3.742
Registrato il: 28/06/2011
Città: AGORDO
Età: 70
Utente Master
2013
OFFLINE
27/04/2019 02:06

A scelta ricreare la prima per ogni tasto, oppure basta solo la seconda...
Option Explicit
Option Compare Text
Sub Sigle_BA()
Dim Ur As Long, X As Long
Ur = Range("A" & Rows.Count).End(xlUp).Row
For X = 1 To Ur
    If Cells(X, 2) = "BA" Then
        Range(Cells(X, 1), Cells(X, 7)).ClearContents
        'oppure  Range(Cells(X, 1), Cells(X, 7)).Delete Shift:=xlUp
    End If
Next X
End Sub
Sub Sigle_tutte()
Dim Ur As Long, X As Long, N As Long, Msg As String
Ur = Range("A" & Rows.Count).End(xlUp).Row
Msg = InputBox("Digitare due caratteri, Ex BA", , "")
If Msg = "" Then Exit Sub
For X = 1 To Ur
    If Cells(X, 2) = Msg Then
        Range(Cells(X, 1), Cells(X, 7)).ClearContents
        'oppure  Range(Cells(X, 1), Cells(X, 7)).Delete Shift:=xlUp
        N = N + 1
    End If
Next X
If N = 0 Then MsgBox "Nessuna sigla con " & Msg
End Sub
[Modificato da raffaele1953 27/04/2019 02:16]
Excel 2013
Vota: 15MediaObject5,00117 1
Amministra Discussione: | Chiudi | Sposta | Cancella | Modifica | Notifica email Pagina precedente | 1 | Pagina successiva
Nuova Discussione
 | 
Rispondi
Cerca nel forum
Tag discussione
Discussioni Simili   [vedi tutte]
Feed | Forum | Bacheca | Album | Utenti | Cerca | Login | Registrati | Amministra
Tutti gli orari sono GMT+01:00. Adesso sono le 19:02. Versione: Stampabile | Mobile | Regolamento | Privacy
FreeForumZone [v.6.1] - Copyright © 2000-2024 FFZ srl - www.freeforumzone.com