Supposing your “csv” is loaded into a spreadsheet under LibreOffice
…
Finding the relevant cells is simple with the help of a RegularExpression: Select the column, call Find&Replace
(Ctrl+H
by default in recent versions), enable Regular expressions
, enter ^\w+'$
behind Find:
and click Find All
But spreadsheets don’t support a move command for non-adjacent SheetCellRanges.
If you insist on getting this functionality you will need to write user code.
The other way is to enter a “selective formula” into all the cells of column B down to the last cell where coumn A can contain something.
The formula should be =IFERROR(REGEX(A2; "^\w+'$";;1);"")
.
You may later copy the range of results and use Paste Special..
to get the results without the formulas.
Both ways are demonstrated in the attached example.
disask93298FullService.ods (17.4 KB)
To see the user code working, you need to permit document macros exceptionally. (Never do so without checking the code for probably malign parts.)