Copy and paste data macro in calc

Hi this question might have been asked a 10000 time but i looked at all the posts and i cannot understand , i want to copy data from certain cells to another file
EXAMPLE:
BASE FILE

date 5/5/5
name of buyer = megacorp

name of product / quantity / price of unit / total

  • / 7777 / 0000 / 585484
  • / 5555 / 00000 / 8484458
  • ########## / 9999 / 0000000 / 18184828

FILE IM GOING TO COPY TO
date / name of corp / DATA LISTED ABOVE

ik this is a lot but im a first time user of libre calc and have no idea how to use it thx

i should say that i have over 1000 files thats why i need the macro

First of all you need to describe your problem much more precisely.
At least needed information:

  1. Why do you think to need to copy data into a thousand files? Isn’t there a probably better way to get what you need?
  2. How do yo get the source file? Is it always the same or always already opened?
  3. How is your source range described? Is there more than one?
  4. How are the target files designated?
  5. What’s the target position? Always the same? Depending on …?
1 Like

@Villeroy
Shouldn’t we probably reduce user determent a bit.
Trying to support software nobody is using any more also isn’t much fuin.

1 Like

to answer your questions
0. i need to sort my data month by month from 2018 to 2021
so lets say all the data for may of 2018 is in one file wich is composed of of lots of sheets and i need to transport it to another to a file for the whole year of 2018 in 1 sheet

  1. no , it changes because of what i said earlier there. one month is a source file
  2. i dont really understand but i guess 12 months in 4 years that’s 48 source files
  3. by year one for 2018 , 2019 …
  4. if you are talking about positions like directories if its in the same folder sure

thank you so much

About

  1. It actually seems there was made a mess from your data. Most likely they are stored in a basically improper way. The huge lot of data you seem to have should be handled by database means. To create monthly files is a very good concept to get eternal problems.
  2. The original question seemed to me as if it was about a process of pushing. Now it looks different.
  3. The term “range” was used in the sense applicable to spreadsheets.
  4. I’m confused now. Do you have yearly files in addition to the monthly ones?
  5. Also the term “position” was concerning positions inside of spreadsheets.

I don’t think you can get sufficient advice based on this information. There is a fundamental decision to make, and most likely you should transfer all the data to a database. If your data stored to sheets are workable this way, nobody can tell without having seen them.

If you already have “consolidating ranges” per month or per year and are contented with that mess of split sources, you can (in principle) pull the results to a collecting document by different means. What to do best exactly can again not be decided without having access to the stuff.

Concerning the database solution I’m not sufficiently experienced anyway. Therefore I’m out now.

Have a look at Merge sheets of spreadsheet documents