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
#9326
Bom dia!
É possível adaptar esse código para:
Buscar em uma coluna qualquer linha preenchida com 1 ocultar linha inteira abaixo dela , e continuar buscando.
Agradeço pela ajuda. :)


Sub OcultaLinB1()
Application.ScreenUpdating = False
For Each myCell In Sheets("Plan2").Range("C13:C61")
If myCell <> "" Then
myCell.EntireRow.Hidden = True
End If
Next myCell
Application.ScreenUpdating = True
End Sub
#9568
Sheets("Plan1").Cells.EntireRow.Hidden = False
Y = 1


denovo:
Set w = Sheets("Plan1").Range("a" & Y & ":a65000").Find(1, lookat:=xlWhole)
If w Is Nothing Then
Exit Sub
Else
Y = w.Row + 1

If Sheets("Plan1").Range("a" & Y).Value <> 1 Then
Sheets("Plan1").Rows(Y & ":" & Y).EntireRow.Hidden = True
End If
GoTo denovo:
End If
#9579
Muito obrigado!
Cara funcionou perfeitamente! :D
Queria te pedir mais um favor, eu fiz umas modificações... se eu quiser usar ">0" ou diferente de <>"" ao invés de "<> 1", como seria?
Segue planilha em anexo. :mrgreen:
Novamente te agradeço!
Você não está autorizado a ver ou baixar esse anexo.
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