This may sound familiar but swap the contents of two cells are not possible. Although, to swap two cells, there is an option suggested (ALT + DRAG) which actually use “paste special (with down option)”.
In Microsoft Excel, I used to perform it with following combinations.
1) Select the first cell > cut (Command + x)
2) Select the second cell > swap (Command + i)
Upon disappointment to achieve it in LibreOffice, I tried to record and edit a macro (Please allow me to admit that I have no prior experience in writing macros).
All I’m trying to achieve is to swap the contents of two selected cells.
The result I’m trying to achieve is as follows.
1) Select two cells
2) Run Macro (preferably with shortcut: Command + i)
---- Macro Begins
1) Copy the selected cells (take references of selected cells: A - B).
2) Paste it on the bottom right corner of the spreadsheet (To avoid any chance of loosing data)
// The cells will be pasted as on top of each other
// Rather pasting it at the end of the sheet, if the values are retained in a variable, it will be more than good.
3) Copy and paste the bottom cell (B) on the reference of (A)
4) Copy and paste the top cell (A) on the reference of (B)
I’ve already wasted many hours now and I’d seriously appreciate if someone could do it.