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.
Por Djaramos
Posts
#13591
Boa noite.
Na planilha anexada, preciso fazer uma cópia das células B11:E19, criar uma segunda planilha , colar os valores e renomear a planilha.
Farei isso mês a mês.
Conto com vcs.

Obrigado
Você não está autorizado a ver ou baixar esse anexo.
Por elitexis
#13592
Boa noite meu amigo, não ficou muito claro se você queria abrir uma nova planílha de excel mesmo, ou apenas uma aba, eu considerei o código para uma nova aba conforme segue:

Sheets(1).Select
Range("B11:E19").Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Range("A1").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit

n = Month(Range("a2"))

If n = 1 Then

ActiveSheet.Name = "Janeiro"

End If

If n = 2 Then

ActiveSheet.Name = "Fevereiro"

End If

If n = 3 Then

ActiveSheet.Name = "Março"

End If

If n = 4 Then

ActiveSheet.Name = "Abril"

End If

If n = 5 Then

ActiveSheet.Name = "Maio"

End If

If n = 6 Then

ActiveSheet.Name = "Junho"

End If

If n = 7 Then

ActiveSheet.Name = "Julho"

End If

If n = 8 Then

ActiveSheet.Name = "Agosto"

End If

If n = 9 Then

ActiveSheet.Name = "Setembro"

End If

If n = 10 Then

ActiveSheet.Name = "Outubro"

End If

If n = 11 Then

ActiveSheet.Name = "Novembro"

End If

If n = 12 Then

ActiveSheet.Name = "Dezembro"

End If

End Sub
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