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

Dúvidas sobre cálculos, funções simples e aninhadas, fórmulas matriciais, etc.
  • Avatar do usuário
  • Avatar do usuário
#66745
Boa noite!

Uma opção seria:

supondo que a lista de nomes está na coluna A, na coluna B coloque a seguinte fórmula e arraste para baixo:
Código: Selecionar todos
=PROC(1;0/FREQÜÊNCIA(LINS($1:1);CONT.SE($A$2:$A$100;"<="&$A$2:$A$100));$A$2:$A$100)
#66833
Bom dia.
Segue mais uma opção.
https://www.get-digital-help.com/sort-v ... miter-vba/

Sub SortValuesInCell()
'Dimension variables and declare data types
Dim rng As Range
Dim cell As Range
Dim del As String
Dim Arr As Variant

'Enable error handling
On Error Resume Next

'Show an inputbox and ask for a cell range
Set rng = Application.InputBox(Prompt:="Select a cell range:", _
Title:="Sort values in a single cell", _
Default:=Selection.Address, Type:=8)

'Show an inputbox and ask for a delimiting character
del = InputBox(Prompt:="Delimiting character:", _
Title:="Sort values in a single cell", _
Default:="")

'Disable error handling
On Error GoTo 0

'Iterate through each cell in cell range
For Each cell In rng

'Split values based on the delimiting character and save those to an array variable
Arr = Split(cell, del)

'Sort array using a second user defined function
SelectionSort Arr

'Concatenate array using the same delimiting character
cell = Join(Arr, del)

'Continue with next cell
Next cell

End Sub

Até
Foxtri
#66835
Considerei que cada nome está em uma linha, ou seja, cada um inserido após Alt+Enter.
Cole uma cópia da UDF abaixo em um módulo comum, em seguida cole em B1 ~~~> =OrdenaNomes(A1); arraste para baixo se necessário.
Código: Selecionar todos
Function OrdenaNomes(rng As Range)
 Dim i As Long, j As Long, myArray, temp
  myArray = Split(rng.Value, Chr(10))
  For i = LBound(myArray) To UBound(myArray) - 1
   For j = i + 1 To UBound(myArray)
    If UCase(myArray(i)) > UCase(myArray(j)) Then
     temp = myArray(j)
     myArray(j) = myArray(i)
     myArray(i) = temp
    End If
   Next j
  Next i
  OrdenaNomes = Join(myArray, Chr(10))
End Function
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