You need to go to "Edit Metadata in Bulk" (context menu), go to the second tab "Search and Replace", there you select "Search Field" to be "authors" and (in some versions of Calibre) put the result back into "authors". "Search mode": Regular expression. Then for
FN LN --> LN, FN
Search for:
Replace with:
LN, FN --> FN LN
Search for:
Replace with:
You see at the bottom what's gonna happen to your selected items and can even test your own cases.
If you like what you are doing, you can save these cases, too. I actually call them "FN LN --> LN, FN" and "LN, FN --> FN LN". Then you just pull them down, as needed.
Regards, Mixx