Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Privacywetgeving
Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.
Sub Macro2()
Dim rngBegin As Range, rngCells As Range, l As Long
Application.ScreenUpdating = False
Set rngBegin = ActiveCell
With rngBegin
.TextToColumns Destination:=rngBegin, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=True, Other:=True, OtherChar:=Chr(10), FieldInfo:=Array(Array(1, 2), Array(2, 1))
Set rngCells = Range(.Cells(1), .End(xlToRight))
rngCells.Sort Key1:=rngCells.Range("A1"), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, _
Orientation:=xlLeftToRight
For l = 2 To rngCells.Count - 1
rngBegin = rngBegin & Chr(10) & rngCells(l)
Next
End With
rngBegin.Offset(, 1).Resize(, rngCells.Count - 1).ClearContents
Application.ScreenUpdating = True
End Sub
Neerlands hoop in bange dagen.:thumb:
Sub SorterenInEenCel()
Dim l As Long, arrParts As Variant, str1 As String, str2 As String, lLoop As Long, lLoop2 As Long, concat As String
arrParts = Split(ActiveCell, Chr(10))
For lLoop = 0 To UBound(arrParts)
For lLoop2 = lLoop To UBound(arrParts)
If UCase(arrParts(lLoop2)) < UCase(arrParts(lLoop)) Then
str1 = arrParts(lLoop)
str2 = arrParts(lLoop2)
arrParts(lLoop) = str2
arrParts(lLoop2) = str1
End If
Next lLoop2
Next lLoop
For lLoop = 1 To UBound(arrParts)
concat = concat & Chr(10) & arrParts(lLoop)
Next lLoop
ActiveCell = arrParts(0) & concat
End Sub
Sub SorterenInEenCel()
Dim l As Long, arrSubParts As Variant, rngSorteren As Range, rng As Range, strToSort As String
Dim str1 As String, str2 As String, lLoop As Long, lLoop2 As Long
Application.ScreenUpdating = False
Set rngSorteren = Application.InputBox("Duid de te sorteren cellen aan.", "Cellen aanduiden", Selection.Address, Type:=8)
If WorksheetFunction.Min(rngSorteren.Rows.Count, rngSorteren.Columns.Count) > 1 Or rngSorteren Is Nothing Then Exit Sub
For Each rng In rngSorteren
strToSort = rng.Value
If strToSort <> "" Then
Do While InStr(strToSort, Chr(10) & Chr(10)) > 0
strToSort = Replace(strToSort, Chr(10) & Chr(10), Chr(10))
Loop
Do While Left(strToSort, 1) = Chr(10)
strToSort = Right(strToSort, Len(strToSort) - 1)
Loop
Do While Right(strToSort, 1) = Chr(10)
strToSort = Left(strToSort, Len(strToSort) - 1)
Loop
arrSubParts = Split(strToSort, Chr(10))
For lLoop = 0 To UBound(arrSubParts)
For lLoop2 = lLoop To UBound(arrSubParts)
If UCase(arrSubParts(lLoop2)) < UCase(arrSubParts(lLoop)) Then
str1 = arrSubParts(lLoop)
str2 = arrSubParts(lLoop2)
arrSubParts(lLoop) = str2
arrSubParts(lLoop2) = str1
End If
Next lLoop2
Next lLoop
rng.Value = Join(arrSubParts, Chr(10))
End If
Next rng
Application.ScreenUpdating = True
End Sub
This because the internal binary representations of the characters in Windows are seen in a table something like:
A < B < E < Z < a < b < e < z < À < Ê < Ø < à < ê < ø
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.