Sorting across multiple sheets

Discuss the spreadsheet application
Post Reply
rjstamey
Posts: 3
Joined: Sat Jun 29, 2019 8:00 pm

Sorting across multiple sheets

Post by rjstamey »

I am trying to extract data from CSV files from multiple sheets to fill data in a single sheet that will be used for my ecommerce store.
The multiple sheets come from a distributor with different information regarding products.

The data I get from the distributor contains over 40,000 products, but I am only interested in about 200 of the products, which will be my inventory sheet. Each sheet has a common column based on SKU.

What I would like to do is sort the data in the sheets with 40,000+ rows based on the sheet with 200ish rows. Any row that does not match the SKU's in my inventory sheet, should either be at the bottom or deleted from the sheets since I am not interested in those rows.

I would then like to extract data from the other sheets in certain columns and placed in my inventory sheet in the correct row/column based on the SKU column.

Is there anyway to do this?
OpenOffice 4.1.4 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Sorting across multiple sheets

Post by Villeroy »

A template with a macro to merge csv files into one spreadsheet document: viewtopic.php?f=21&t=77069
This would be far easier to maintain with a database. Spreadsheets are not made for this.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
MrProgrammer
Moderator
Posts: 4907
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Sorting across multiple sheets

Post by MrProgrammer »

rjstamey wrote:The data I get from the distributor contains over 40,000 products, but I am only interested in about 200 of the products, which will be my inventory sheet.
Since you've posted in the Calc forum, use the VLOOKUP function to determine if a product is in your inventory (see Q4/A4). You could use MATCH instead of VLOOKUP. Use a filter to delete the rows not in your inventory as explained in section 7. Analyzing and modifying your data of Ten concepts that every Calc user should know.
Villeroy wrote:This would be far easier to maintain with a database. Spreadsheets are not made for this.
Further reading for that approach:
[Tutorial] Using csv/text files as editable data source
[Example] Loading CSV into preformatted spreadsheets
Villeroy wrote:A template with a macro to merge csv files into one spreadsheet document …
I believe you could perform the merge and filter with Base. For additional assistance, ask in the Base forum.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Post Reply