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

Tudo que estiver relacionado ao Excel básico, como somar, calcular média, colocar bordas, etc.
  • Avatar do usuário
  • Avatar do usuário
Por chenriquesr
#5712
Não consigo classificar, em ordem numérica, sequência de números com ponto
Ex:
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
o Excel entende, de forma errada, da seguinte forma:

1. 1
1. 10
1. 11
1. 2
1. 3
1. 4
1. 5
1. 6
1. 7
1. 8
1. 9
Como resolver esta questão?
Agradeço desde já.
Carlos H.
Avatar do usuário
Por alexandrevba
Avatar
#5713
Boa noite!!

Use uma coluna auxiliar, com algo do tipo.
Código: Selecionar todos
=SUBSTITUIR(A2;".";"")
Classifica tudo que se pareça como número.


Att
Avatar do usuário
Por Parkeless
Posts Avatar
#5932
Tenta isso:
Código: Selecionar todos
=SUBSTITUIR(A2;".";"")
Por Edcronos
Posts
#5939
não sei se é o seu caso
mas eu respondi uma pergunta similar
http://forum.chandoo.org/threads/sortin ... ost-154801
Código: Selecionar todos
Sub testdd()
    Dim array1(), array2(), va As String

    array1 = Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row).Value2
    lf = UBound(array1, 1)
    ReDim array2(1 To lf, 1 To 2)

    For L = 1 To lf
        Aa = Split(array1(L, 1), ".")
        If UBound(Aa) > 0 Then
            If Len(Aa(1)) = 1 Then
                array2(L, 1) = Val(Aa(0) & 0 & Aa(1))
            Else
                array2(L, 1) = Val(Aa(0) & Aa(1))
            End If
        Else
            array2(L, 1) = Val(Aa(0) & "00")
        End If
    Next



    ci1 = 1
    inC = ci1:
    i = inC + 1
    Do
        v1 = array2(inC, 1)
        v2 = array2(inC + 1, 1)
        va1 = array1(inC, 1)
        va2 = array1(inC + 1, 1)
        A = v1
        b = v2
        Aa = va1
        ba = va2
        If A > b Then

            array2(inC, 1) = b: c = A
            array2(inC + 1, 1) = c
            array1(inC, 1) = ba: ca = Aa
            array1(inC + 1, 1) = ca
            If inC > ci1 Then inC = inC - 1
        Else
            inC = i: i = i + 1
        End If
    Loop Until inC = lf
    '    For L = 1 To lf
   '        aa = Split(array1(L, 1), ".")
   '        array2(L, 1) = Val(aa(0))
   '        If UBound(aa) > 0 Then array2(L, 2) = Val(aa(1))
   '    Next

    Range("a2:a" & lf + 1).Value2 = array1
    Range("b2:c" & lf + 1).Value2 = array2
End Sub
Avatar do usuário
Por Parkeless
Posts Avatar
#5949
Não acho que precise de macro...

A ordem tem que ser:
Código: Selecionar todos
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
Se trocarmos o ponto por "nada", temos:
Código: Selecionar todos
11
12
13
14
15
16
17
18
19
110
111
A partir daí uma classificação simples resolve.
Por exata0mente
#6034
O formato da sequência está como TEXTO. Mude-a para NÚMERO.

Fiz o teste no meu e funcionou. O formato TEXTO não entende os caracteres "," ";" "." como separadores.
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