Ask Your Question
0

Copy Paste Macro in Libre Office Calc

asked 2019-07-10 11:30:37 +0200

libremacrouser gravatar image

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?

C:\fakepath\Trial.ods

edit retag flag offensive close merge delete

Comments

@libremacrouser, this is the expected final result ?

image description

-----------------------------------------------------------------------------

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

Gilberto Schiavinatto gravatar imageGilberto Schiavinatto ( 2019-07-11 15:33:12 +0200 )edit

Can I do it with libre office macro?

libremacrouser gravatar imagelibremacrouser ( 2019-07-12 10:52:25 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2019-07-12 18:17:36 +0200

pierre-yves samyn gravatar image

Hi

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

image description

  • 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

edit flag offensive delete link more
0

answered 2019-07-12 13:37:12 +0200

updated 2019-07-12 13:37:36 +0200

@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.

edit flag offensive delete link more

Comments

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.

libremacrouser gravatar imagelibremacrouser ( 2019-07-12 13:46:24 +0200 )edit

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

Gilberto Schiavinatto gravatar imageGilberto Schiavinatto ( 2019-07-12 13:56:07 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-10 11:30:37 +0200

Seen: 46 times

Last updated: Jul 12