Jump to content

Ajuda com excel organização dos jogos lotofácil


Al21

Recommended Posts

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 by Al21
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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
 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...