I could copy and paste cell contents (which can includes new lines with alt+enter) respectively and separately to another column in another sheet with the below code until i added bolded part into the code.
My aim is to sort cell content if there in ‘NONE’ string in the C column. But i receive error 1004 at this line.
Sub Sheet2_Button_Click()
Dim ws As Worksheet, lastR As Long, arr, arrSpl, arrFin, i As Long, j As Long, k As
Long
Set ws = ActiveSheet
lastR = ws.Range("A" & ws.rows.count).End(xlUp).row
arr = ws.Range("A1:A" & lastR).Value2
ReDim arrFin(1 To UBound(arr) * 15, 1 To 1)
For i = 1 To UBound(arr)
If arr(i, 1) <> "" And **ws.Range(“C2:C”) = “NONE”** Then
arrSpl = Split(arr(i, 1), vbLf)
For j = 0 To UBound(arrSpl)
k = k + 1
arrFin(k, 1) = arrSpl(j)
Next j
End If
Next i
If k > 0 Then
Worksheets(sheet1).Range("B:B").ClearContents
Worksheets(sheet1).Range("B1").Resize(k, 1).Value2 = arrFin
End If
End Sub