Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
#68176
Bom dia

Preciso de uma Macro que conte a quantidade de células da Coluna [Registro] da Tabela TB_Procedimentos que apresentam valor igual à "-" e que depois exclua essas linhas.

Poderiam me ajudar?

Segue planilha para aplicação e teste da Macro.
Você não está autorizado a ver ou baixar esse anexo.
#68177
Boa tarde.
Veja se esta macro atende a sua necessidade.

Sub ExcluirLinhas()
Dim Plan As Worksheet
Dim rng As Range
Dim c As Range
Set Plan = Wsh_Procedimentos
Set rng = Plan.ListObjects("TB_Procedimentos2").ListColumns(1).Range
Do
Set c = rng.Find("-", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub

Até

Foxtri
SandroLima agradeceu por isso
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord