Friaça Posted July 15, 2020 Share Posted July 15, 2020 Bom dia Pessoal. Estou com dificuldades e nem sei se isso é possivel. Tenho 10 colunas e 25 linhas e gostaria de transpor ou colocar essas 25 linhas em uma unica linha todas de uma vez. Isso é possivel? Mesmo que tenha numeros repetidos, não importa. Quero fazer uma unica linha no total de 250 numeros, uma apos a outra. Agradeço quem puder ajudar. Quote Link to comment Share on other sites More sharing options...
Joh2010 Posted July 15, 2020 Share Posted July 15, 2020 . Quote Link to comment Share on other sites More sharing options...
Friaça Posted July 15, 2020 Author Share Posted July 15, 2020 @Joh2010 ok amigo. Se puder cria-la...seria de grande ajuda...minha caixa de MP esta vazia Quem sabe podemos ter benefícios nisso? Aguardo Obrigado. Quote Link to comment Share on other sites More sharing options...
Julio Cezar Posted July 15, 2020 Share Posted July 15, 2020 @Friaça nao seria o caso de referenciá-las e enfileirar?? Quote Link to comment Share on other sites More sharing options...
Joh2010 Posted July 15, 2020 Share Posted July 15, 2020 Tá lá @Friaça, postei apenas o que vc pediu. Só responde se funcionou, blz! Quote Link to comment Share on other sites More sharing options...
Friaça Posted July 15, 2020 Author Share Posted July 15, 2020 (edited) @Julio Cezar o amigo joh2010 já deu uma dica. Agradeço a resposta. Mas a sua forma é feita com base copiar e colar e permanecerem em fila, numa única linha? Edited July 15, 2020 by Friaça Quote Link to comment Share on other sites More sharing options...
Ralf Jones Posted July 17, 2020 Share Posted July 17, 2020 @Friaça Se for isso aqui que você quer problema resolvido TutorialExcel.wmv 1 Quote Link to comment Share on other sites More sharing options...
Ralf Jones Posted July 17, 2020 Share Posted July 17, 2020 A macro esta aqui Spoiler Sub Transpor_varias_linhas_em_uma_so() 'Site cheio de Ninjas Capoeristas rsrsrrsrsr 'https://www.comoganharnaloteria.com.br/forum/ 'Tópico Criado por Friaça 'Transpor várias linhas em uma só. 'https://www.comoganharnaloteria.com.br/forum/topico/33913-transpor-varias-linhas-em-uma-s%C3%B3/ Titulo = "Ralf Jones [Transpor várias linhas em uma só]" Dim Intervalo As Range Dim Cell_destino As Range Set Intervalo = Application.Selection On Error Resume Next Set Intervalo = Application.InputBox("Selecione os intervalos a serem transformados:", Titulo, Intervalo.Address, Type:=8) If Intervalo.Cells.Count < 2 Then MsgBox "Selecione no mínimo duas células!" & Chr(13) & "Procedimento Cancelado" Exit Sub End If Set Cell_destino = Application.InputBox("Selecione a célula de destino:", Titulo, Type:=8) Linhas = Intervalo.Rows.Count Colunas = Intervalo.Columns.Count Application.ScreenUpdating = False For x = 1 To Linhas Intervalo.Rows(x).Copy Cell_destino Set Cell_destino = Cell_destino.Offset(0, Colunas + 0) Next Application.ScreenUpdating = True End Sub 2 Quote Link to comment Share on other sites More sharing options...
Friaça Posted July 17, 2020 Author Share Posted July 17, 2020 @Ralf Jones beleza amigo... Vou dar uma olhada mais tarde. Obrigado pela ajuda. Quote Link to comment Share on other sites More sharing options...
Pataca Posted July 18, 2020 Share Posted July 18, 2020 Em 17/07/2020 em 15:25, Ralf Jones disse: A macro esta aqui Ocultar conteúdo Sub Transpor_varias_linhas_em_uma_so() 'Site cheio de Ninjas Capoeristas rsrsrrsrsr 'https://www.comoganharnaloteria.com.br/forum/ 'Tópico Criado por Friaça 'Transpor várias linhas em uma só. 'https://www.comoganharnaloteria.com.br/forum/topico/33913-transpor-varias-linhas-em-uma-s%C3%B3/ Titulo = "Ralf Jones [Transpor várias linhas em uma só]" Dim Intervalo As Range Dim Cell_destino As Range Set Intervalo = Application.Selection On Error Resume Next Set Intervalo = Application.InputBox("Selecione os intervalos a serem transformados:", Titulo, Intervalo.Address, Type:=8) If Intervalo.Cells.Count < 2 Then MsgBox "Selecione no mínimo duas células!" & Chr(13) & "Procedimento Cancelado" Exit Sub End If Set Cell_destino = Application.InputBox("Selecione a célula de destino:", Titulo, Type:=8) Linhas = Intervalo.Rows.Count Colunas = Intervalo.Columns.Count Application.ScreenUpdating = False For x = 1 To Linhas Intervalo.Rows(x).Copy Cell_destino Set Cell_destino = Cell_destino.Offset(0, Colunas + 0) Next Application.ScreenUpdating = True End Sub @Ralf Jones Parabéns!!! Utilizei a sua macro em um estudo e funcionou perfeitamente. 1 Quote Link to comment Share on other sites More sharing options...
Ralf Jones Posted July 19, 2020 Share Posted July 19, 2020 @Pataca Que bom que funcionou Desejo muita sorte ai nos seus estudos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.