Discover an efficient method for importing and organizing your data in Google Sheets. Learn to concatenate columns into rows effortlessly! --- This video is based on the question https://stackoverflow.com/q/62659717/ asked by the user 'Tayzer Damasceno' ( https://stackoverflow.com/u/13382780/ ) and on the answer https://stackoverflow.com/a/62666913/ provided by the user 'player0' ( https://stackoverflow.com/u/5632629/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions. Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Import data from different columns and paste in rows using google sheet Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l... The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license. If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com. --- Streamlining Data Import in Google Sheets If you've worked with data in Google Sheets, you may have encountered the need to import data from different columns and consolidate it into rows. This process can seem overwhelming, especially when trying to filter and manage large datasets. Fortunately, with a simple function, you can achieve this with ease. The Problem Imagine you have two sets of data—one in Columns A to D and another in Columns E to H. You want to filter specific entries based on certain criteria: You need to compare values in Columns B and C to find mismatches. Values in Column D must be non-empty text entries. You also want to do this for the range from Columns E to H. Your Desired Output Ultimately, you want to generate a new dataset that looks like this: [[See Video to Reveal this Text or Code Snippet]] The Solution To resolve this issue and import your data seamlessly, you can use the QUERY function combined with IMPORTRANGE. Here's how to implement it: Step-by-Step Breakdown Create Your QUERY Formula: This function allows you to manipulate and filter your data efficiently. Use IMPORTRANGE: This will help to pull in the data from two different ranges within your spreadsheet. Here’s the formula you'll want to use: [[See Video to Reveal this Text or Code Snippet]] Explanation of the Formula IMPORTRANGE("xx", "Database!A:D"): This part imports data from columns A to D in your specified source. IMPORTRANGE("xx", "Database!E:H"): Similarly, this imports columns E to H. Curly Braces { ... }: These combine the two ranges into one cohesive dataset. QUERY Function: The QUERY function processes this combined dataset and filters it according to your needs: "select Col1, Col4": This specifies which columns you want to retain in your final result. "where Col2 Col3": This filters out rows where the data in Column B matches Column C. "and Col4 is not null": This ensures that only rows with a non-empty value in Column D are included. 0 at the end: Indicates that the header row is not included in the result. Final Thoughts By using this method, you can efficiently import and organize your data in Google Sheets without the hassle of manual concatenation or adjustments. This allows for better analysis and clarity when handling extensive datasets. Whether you're a beginner or someone looking to enhance your Google Sheets skills, mastering these formulas can significantly improve your productivity. Give it a try and experience the efficiency yourself!