Copy Paste Macro in Libre Office Calc

Hello!

I want to create copy paste macro with libre office calc. As I add my file, I have several sheets and in first sheet I have several names like A,B,C and thier amounts which in different column. I want to chech these names with second sheet and if there is the same name in second sheet I want to copy these name and paste to thirt sheet. And I want to cross their amounts. How can I do it? Can you help me?

Trial.ods

@libremacrouser, this is the expected final result ?


ATTENTION: If you would like to give more details to your question, use edit in question or add a comment below. Thank you.

Can I do it with libre office macro?

@libremacrouser, could be like that ?

test file


ATTENTION: If you would like to give more details to your question, use edit in question or add a comment below. Thank you.

If the answer met your need, please click on the ball Descrição da imagem to the left of the answer, to finish the question.

Yes, thanks you! I want it like this, but I couldn’t find its code so I don’t work how I will run it.

It does not have macros, I just used named area and formulas.

Hi

Just for information, you can also get the result without macro or formula, using the DataConsolidate menu.

  • Choose the function (here Product)
  • Select and successively add the ranges to be added to the consolidation
  • Set the “target”
  • Options: set the basis on which consolidation is done (here names in the rows)

The only constraint is that the column headers must be identical between all the sheets to be consolidated. I have renamed Name1 to Name in Sheet2.

Regards