I need a little help editing my existing VBA code to work with libre office.
I would like:
1) to copy errors in column C if the date in the same row in yellow,
2) sort them all by date oldest to newest
3) (if possible) if the button (that triggers the macro is pressed it clears any previous entries in “STATUS” tab).
https://imgur.com/a/GQVmEPv ← example
code
Code: Alles auswählen
Option Compare Text
Sub getAllErr()
Dim ws As Worksheet
Dim lastRow As Integer
For Each ws In ThisWorkbook.Sheets
If ws.Name <> "status" Then
For i = ws.UsedRange.Rows.Count To 2 Step -1
If ws.Cells(i, 1).Interior.Color = 65535 Then
lastRow = ThisWorkbook.Sheets("status").Cells(Rows.Count, 1).End(xlUp).Row
ThisWorkbook.Sheets("status").Cells(lastRow + 1, 1) = Format(ws.Cells(i, 1), "Short Date")
ThisWorkbook.Sheets("status").Cells(lastRow + 1, 2) = ws.Name
ThisWorkbook.Sheets("status").Cells(lastRow + 1, 3) = ws.Cells(i, 3)
End If
Next i
End If
Next ws
End Sub
MsgBox "Kopirano"