Guest id13601 Posted July 27, 2015 at 10:02 PM Report #586451 Posted July 27, 2015 at 10:02 PM Boa noite, Como entendo pouco de vba gostaria de por aqui duas questões, como posso substituir rng.EntireRow.Copy por um range tipo A2:cxxxx para que o código abaixo funcionasse? E como é que possso substituir If rng Like "*not*" Then ligar este código a uma célula sem ter de escrever os asteriscos antes e depois de ecrever uma palavra? desde já obrigado. Sub CopyRows() Application.ScreenUpdating = False Dim bottomA As Integer bottomA = Sheets("Folha1").Range("A" & Rows.Count).End(xlUp).Row Dim rng As Range For Each rng In Sheets("Folha1").Range("a2:A" & bottomA) If rng Like "*not*" Then rng.EntireRow.Copy Sheets("Folha2").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) End If Next rng Application.ScreenUpdating = True End Sub
Guest id13601 Posted July 29, 2015 at 05:33 AM Report #586486 Posted July 29, 2015 at 05:33 AM (edited) Boas, tentei mudar o rng.EntireRow.Copy para rng.Folha1.Range("A2:C1000").Copy mas dá sempre erro, nao sei onde estou a errar,este código rng.EntireRow.Copy copia-me as linhas e eu queria que me copiasse da coluna A:C Edited July 29, 2015 at 05:34 AM by sagostinho
Guest id13601 Posted August 8, 2015 at 05:59 PM Report #586850 Posted August 8, 2015 at 05:59 PM Alguém ajuda. 😞
manuel antonio Posted September 24, 2015 at 08:43 PM Report #588271 Posted September 24, 2015 at 08:43 PM (edited) rng.Folha1.Range("A2:C1000").Copy mas dá sempre erro, nao sei onde estou a errar,este código Experimentaste: rng.Sheets("Folha1").Range("A2:C1000").Copy Edited October 10, 2015 at 10:30 PM by manuel antonio
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now