Ask Your Question
0

What are the limitations of macros in LibreOffice Calc?

asked 2016-10-04 21:07:15 +0100

DG gravatar image

I've been trying to copy text from two cells to a third [first name + last name to "display name"]. When I do the command sequence manually it works fine but when I record a macro it merely copies from a previous line done manually. My keystroke sequence is: move to the pertinent "last name" cell with the directional keys, copy the cell contents, move to the target cell, enter F2 to edit, paste the last name, add a comma and a space, move with the directional keys to the appropriate "first name" cell, copy the contents from that cell, move to the target cell with the directional keys, enter F2 to edit, paste the first name, press RETURN to the next row.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-10-04 21:41:24 +0100

mark_t gravatar image

Recording macros can sometimes be usefull to find the commands needed but often they need to be edited afterwards to make them usefull. It's usually better to write the macro in Basic.

Are you sure you want a macro to do this? If you give the column number for first name and last name and you want the display name in the selected cell then I'll post an example.

An alternate would be to use a formula in the target cell, for example:-

=$B2 & ", " & $A2

Then this cell formula can be copied and pasted down the column.

If you then want to keep the display name without the formula you could copy that column and paste special back to itself as values only.

edit flag offensive delete link more

Comments

THANK YOU for the perfect solution. I hadn't realized (or I forgot) that cell formulae could include text strings.

DG gravatar imageDG ( 2016-10-04 22:32:31 +0100 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2016-10-04 21:07:15 +0100

Seen: 241 times

Last updated: Oct 04 '16