Hmmmm. They must not like antivirals and VPNs
Check this out:
Rooster: Can you write me a VBA routine for a sorting a single column of numbers from low to high and sort all data in connected cells on a line by line basis and add an empty line between those numbers which are equal to each other
ChatGPT: Certainly! Here is a VBA routine that sorts a single column of numbers from low to high and sorts all data in connected cells on a line-by-line basis, and then adds an empty line between those numbers which are equal to each other:
Sub SortAndAddEmptyLine()
Dim lastRow As Long
Dim currentNum As Double
Dim nextNum As Double
Dim i As Long
’ Find the last row of the data in the column to be sorted
lastRow = Cells(Rows.Count, “A”).End(xlUp).Row
’ Sort the column of numbers from low to high
Range(”A1:A” & lastRow).Sort Key1:=Range(”A1”), Order1:=xlAscending, Header:=xlNo
’ Sort all data in connected cells on a line-by-line basis
For i = 1 To lastRow
Cells(i, 1).Resize(1, Columns.Count - 1).Sort _
Key1:=Cells(i, 1), Order1:=xlAscending, Header:=xlNo
Next i
’ Add an empty line between those numbers which are equal to each other
For i = lastRow To 2 Step -1
currentNum = Cells(i, 1).Value
nextNum = Cells(i - 1, 1).Value
’ If the current number is equal to the next number, insert an empty line between them
If currentNum = nextNum Then
Cells(i, 1).EntireRow.Insert shift:=xlDown
End If
Next i
End Sub