[Solved] Merge two (2 axis) spreadsheets into one

Discuss the spreadsheet application
Post Reply
alienrobotghost
Posts: 13
Joined: Thu Jun 25, 2020 10:01 am

[Solved] Merge two (2 axis) spreadsheets into one

Post by alienrobotghost »

See attached... (hopefully I described it in a way that makes sense)
Attachments
Untitled.png
Last edited by Hagar Delest on Thu Jun 25, 2020 10:56 pm, edited 1 time in total.
Reason: tagged solved
openoffice 4.1.1 on windows 7
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: Merge two (2 axis) spreadsheets into one

Post by JohnSUN-Pensioner »

Welcome to the forum!
You got a very beautiful screenshot. I even wanted to solve this problem for you. But when I thought that I would have to create these two tables for testing, I became lazy. It's so boring to manually create data if you know that this data already exists somewhere. If instead of a screenshot you give a sample of the data in the form of a spreadsheet, then (perhaps!) it is possible to avoid agonizing amount of work
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
alienrobotghost
Posts: 13
Joined: Thu Jun 25, 2020 10:01 am

Re: Merge two (2 axis) spreadsheets into one

Post by alienrobotghost »

Here is the actual file... I want to combine the contents of sheet 2, into sheet 1...
Attachments
ALCHEMY.ods
(19.95 KiB) Downloaded 114 times
openoffice 4.1.1 on windows 7
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: Merge two (2 axis) spreadsheets into one

Post by JohnSUN-Pensioner »

OK, we can do something about it! I did not understand the purpose of the yellow background of some columns and rows, so I did not transfer them to Sheet3

Update In fact, it is very simple. Supplement your original table with new values, sort by the first column, transpose the table, sort again and transpose again.
All this takes no more than a minute, details on YouTube
Attachments
ALCHEMY 1.ods
(29.39 KiB) Downloaded 130 times
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
alienrobotghost
Posts: 13
Joined: Thu Jun 25, 2020 10:01 am

Re: Merge two (2 axis) spreadsheets into one

Post by alienrobotghost »

You, my friend, are FREAKING AWESOME!!!

Thank you for this!!!
openoffice 4.1.1 on windows 7
User avatar
MrProgrammer
Moderator
Posts: 4905
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: [Solved] Merge two (2 axis) spreadsheets into one

Post by MrProgrammer »

The steps below would do what you've asked with any version of OpenOffice, LibreOffice, NeoOffice, etc. This is similar to JohnSUN-Pensioner's method but doesn't need the transpose steps. It merges the two spreadsheets whether or not the second one is empty.

Step 1
Copy/paste three ranges from the second spreadsheet to the first.

Step 2
Sort the range shown (excludes the first row)
Select only the columns with your data, not all of them
Data → Sort → Options → Uncheck Range contains column labels → Direction = Top to Bottom
Sort Criteria → Sort by → Column A → Ascending → OK
The Step 2 image below shows the result after performing these steps

Step 3
Sort the range shown (excludes the first column)
Select only the rows with your data, not all of them; asking Calc to sort a million rows will be very, very show
Data → Sort → Options → Uncheck Range contains row labels → Direction = Left to Right
Sort Criteria → Sort by → Row 1 → Ascending → OK
The Step 3 image below shows the result after performing these steps
Screen Shot 2020-06-25 at 11.04.04.jpg
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).
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: [Solved] Merge two (2 axis) spreadsheets into one

Post by JohnSUN-Pensioner »

Oh yes, Mr. Programmer! I completely forgot that we can sort rows, not just columns! Of course, here two transpositions are completely unnecessary, just set the green option at the right time.
Sort2.png
(I’m not sure that "Unchek" used in the description of the sequence of actions is a correct word. It seemed to me that the "Turn On" is more correct. Or I missed again?)
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
alienrobotghost
Posts: 13
Joined: Thu Jun 25, 2020 10:01 am

Re: [Solved] Merge two (2 axis) spreadsheets into one

Post by alienrobotghost »

For the instruction:

"Sort Criteria → Sort by → Column A → Ascending → OK"

"Column A" is not an option... there is an option for "undefined" or any of the coordinates for the columns i've selected (which the previous instruction says to only select the columns that contain the data I want to merge)

What am I missing here?
openoffice 4.1.1 on windows 7
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: [Solved] Merge two (2 axis) spreadsheets into one

Post by JohnSUN-Pensioner »

Perhaps if you write at least something to cell A1 (for example, the \ character), the sorting modes become a little clearer - you can see "Сolumn A" or "\" depending on the state of the "Range contains row/column labels" switch
SortByLabels.png
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
alienrobotghost
Posts: 13
Joined: Thu Jun 25, 2020 10:01 am

Re: [Solved] Merge two (2 axis) spreadsheets into one

Post by alienrobotghost »

I'm sorry, I was not following the instructions correctly... but I figured it out now... thanks for your help
openoffice 4.1.1 on windows 7
Post Reply