Guest id13601 Posted May 17, 2012 at 09:54 PM Report #456551 Posted May 17, 2012 at 09:54 PM Olá pessoal desde já muitos parabéns pela mudança na minha opinião acho que está espectacular. Então é o seguinte pretendo com um filtro avançado ir buscar dados a outro livro que se encontra em c:\ com base num critério e que me vá colando esses dados sempre na ultima célula em branco. Até agora tenho isto: Sub Filter() Sheets("Sheet1").Range("A1:C7").AdvancedFilter _ Action:=xlFilterCopy, _ CriteriaRange:=Sheets("Sheet1").Range("E1:E2"), _ CopyToRange:=Sheets("Sheet2").Range("A1"), _ Unique:=False End Sub Desde já Obrigado
acao Posted June 5, 2012 at 01:51 PM Report #460542 Posted June 5, 2012 at 01:51 PM boas amigo terá que começar por aqui http://www.macoratti.net/excel_vb.htm boa sorte cumps acao
Guest id13601 Posted June 5, 2012 at 06:19 PM Report #460650 Posted June 5, 2012 at 06:19 PM (edited) boas amigo terá que começar por aqui http://www.macoratti.net/excel_vb.htm boa sorte cumps acao Olá obrigada por me estares a ajudar,eu fiz assim o seguinte código agora não sei se esta correcto mas funciona. Sub teste() Set Book = GetObject("C:\Nova pasta\bd1.xlsx") Book.Sheets("Folha1").Range("A1:e20").AdvancedFilter _ Action:=xlFilterCopy, _ CriteriaRange:=Sheets("folha1").Range("h1:h2"), _ CopyToRange:=Sheets("folha1").Cells(Cells.Rows.Count, 1).End(xlUp).Offset(1, 0), Unique:=False End Sub Aceito opiniões. cumps Edited June 5, 2012 at 06:21 PM by sagostinho
acao Posted June 5, 2012 at 10:34 PM Report #460744 Posted June 5, 2012 at 10:34 PM boas já vi que conseguiu, optimo. depois dê topico resolvido. cumps acao
Guest id13601 Posted June 7, 2012 at 08:27 PM Report #461252 Posted June 7, 2012 at 08:27 PM (edited) Obrigado ao membro acao mas como esta questão já esta resolvida vou dar este tópico como resolvido. Edited June 7, 2012 at 08:27 PM by sagostinho
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