Al21 Posted October 8, 2018 Share Posted October 8, 2018 (edited) olá amigos gostaria de uma ajuda para classificar os jogos alguma função ou método que faça isso de forma automática pois estou tendo dificuldade nenhuma modalidade que pego para analisar os jogos estão desorganizados e fazer um a um é inviável principalmente se muitos jogos. Obrigado. CLASSIFICAR DE MENOR PARA O MAIOR --------------------------------------------------------------------------------------------------------------------------------------->>>>>>>> 21 16/02/2004 5 2 1 22 19 8 24 4 25 23 18 20 14 11 16 22 25/02/2004 13 15 5 9 7 10 1 3 22 2 25 14 6 4 12 23 01/03/2004 10 11 5 19 18 14 6 4 20 1 8 3 12 16 17 24 08/03/2004 1 19 21 14 2 23 25 5 20 11 7 10 24 17 3 CLASSIFICAR DE MENOR PARA O MAIOR --------------------------------------------------------------------------------------------------------------------------------------->>>>>>>> Edited October 8, 2018 by Al21 Quote Link to comment Share on other sites More sharing options...
Wata Posted October 8, 2018 Share Posted October 8, 2018 Temos um Sub-Fórum exclusivo para Excel. Inclusive com a solução para essa sua dúvida. ... 1 Quote Link to comment Share on other sites More sharing options...
pietruk Posted October 8, 2018 Share Posted October 8, 2018 @Al21 Se quiser todos os resultados da Lotofacil classificado do menor para o maior posso postar o arquivo em txt para você 1 Quote Link to comment Share on other sites More sharing options...
Substantivo Posted October 11, 2018 Share Posted October 11, 2018 Em 08/10/2018 at 17:03, Al21 disse: olá amigos gostaria de uma ajuda para classificar os jogos alguma função ou método que faça isso de forma automática pois estou tendo dificuldade nenhuma modalidade que pego para analisar os jogos estão desorganizados e fazer um a um é inviável principalmente se muitos jogos. Obrigado. CLASSIFICAR DE MENOR PARA O MAIOR --------------------------------------------------------------------------------------------------------------------------------------->>>>>>>> 21 16/02/2004 5 2 1 22 19 8 24 4 25 23 18 20 14 11 16 22 25/02/2004 13 15 5 9 7 10 1 3 22 2 25 14 6 4 12 23 01/03/2004 10 11 5 19 18 14 6 4 20 1 8 3 12 16 17 24 08/03/2004 1 19 21 14 2 23 25 5 20 11 7 10 24 17 3 CLASSIFICAR DE MENOR PARA O MAIOR ----------------------------------------------------------------------------- --------------------------------------------------------->>>>>>>> Cole as dezenas - somente as dezenas - numa planilha vazia a partir de A1. Vá para o Visual Basic e insira um módulo Copie a rotina abaixo e cole no módulo que foi criado Sub ClassificarLinha() 'Esta macro classifica linhas em ordem crescente Dim Area As Range Dim x As Integer Range("A1").Select Application.ScreenUpdating = True Set Area = ActiveCell.Range("A1:iv1") FinalLinha = Cells(65536, 1).End(xlUp).Row For x = 1 To FinalLinha ActiveCell.Rows("1:1").EntireRow.Sort Key1:=ActiveCell, Order1:=xlAscending _ , Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlLeftToRight, DataOption1:=xlSortNormal ActiveCell.Offset(1, 0).Range("A1").Select Application.ScreenUpdating = False Next x End Sub Feche o visual Basic e execute a macro na planilha que você colou as dezenas. Quote Link to comment Share on other sites More sharing options...
eduardodp Posted October 11, 2018 Share Posted October 11, 2018 EXIBIÇÃO - MACROS - GRAVAR MACROS TECLA DE ATALHO - ESCOLHA UMA LETRA - OK EXIBIÇÃO - MACROS - PARAR GRAVAÇÃO MOUSE DIREITO - EXIBIR CODIGOS DUPLO CLICK - MODULO1 COPIE ESSE CODIGO - LOGO ABAIXO DA TECLA DE ATALHO Dim Arquivo, vlin retorno: On Error GoTo 0 ' desative a interceptação de erro. On Error Resume Next ' adie a interceptação de erro. Arquivo = Empty Arquivo = InputBox("Nome do Arquivo? - [ 999=Saída ]") If Val(Arquivo) = Val(999) Then GoTo saida vlin = 1 Sheets(Arquivo).Select If Err.Number = 9 Then GoTo retorno End If Do While Trim(Range("A" & vlin)) <> "" Range("A" & vlin & ":" & "CV" & vlin).Select Selection.Sort Key1:=Range("A" & vlin), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight vlin = vlin + 1 Loop saida: Sheets("plan1").Select 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.