PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, December 7, 2022

[FIXED] How to stack multiple columns into one, alternating rows - Google Sheets

 December 07, 2022     arrays, flatten, google-sheets, spreadsheet, syntax     No comments   

Issue

I'm working on a Google Sheets document that has data stacked in columns in an unusual order (see image for reference)

I have what you see on columns A, B and C. But I want what I have on column E. I have 8 pages with hundreds of data elements, all sorted in 3 columns like that and I'm looking for a formula or a custom script that would allow me to arrange the data in the right sequence.

I did research trying to find a solution, but none of the ones I found work well for this situation. The order of the elements is very important.

enter image description here


EDIT: The data is not numbers. It's text. So sorting formulas wouldn't work, because it would sort it alphabetically and it would mess up the order


Solution

all you need is:

=FLATTEN(A1:C7)

with open ranges you can do:

=QUERY(FLATTEN(A1:C); "where Col1 is not null"; )

see: https://stackoverflow.com/questions/73767719/

enter image description here



Answered By - player0
Answer Checked By - Marie Seifert (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing