Combine 3 sheets into one with importrange - arrays

Goal: Merge 2 sheets into the main sheet all in one sheet via importrange
Problem: All the columns are in different orders
I would like to importrange the 2 sheets in client master sheet 2 into the main sheet in one table. Is that possible while the columns are not in the same orders?

use:
={QUERY(IMPORTRANGE("1Er_6mSY5TFJ5sb_DDRc6QY3aIzqen_QfVYg3FvBFZ3I", "Sheet 2!A2:E"),
"select Col2,Col3,Col1,Col5,Col4 where Col1 is not null", 0);
QUERY(IMPORTRANGE("1Er_6mSY5TFJ5sb_DDRc6QY3aIzqen_QfVYg3FvBFZ3I", "Sheet 3!A2:E"),
"select Col2,Col4,Col1,Col3,Col5 where Col1 is not null", 0)}

Related

Trouble with unique formula and matching criteria from multiple columns and sheets

My sheet has an agent count page that displays the names and how many times an agents name is on both sheets "IAD(Tampa)" and "Archive Docs".
=UNIQUE(QUERY({'IAD(Tampa)'!D3:D; 'Archived Docs'!D3:D},))
=COUNTIF('Archived Docs'!D3:D,A:A) + COUNTIF('IAD(Tampa)'!D3:D,A:A)
The ask is this. How can I do the above if column "H" and "Match A3:A12" are a match?
Example would be DO NOT count Jesse when column "H" is Daniel because this NOT a match.
Column "A" should be the name and column "B" should be the count.
SAMPLE SHEET https://docs.google.com/spreadsheets/d/1befqsGQvbPfn0XTGrygLOGcrUIMrICUagJVH0S-2rDw/edit?usp=sharing
try:
=QUERY({'IAD(Tampa)'!D3:H; 'Archived Docs'!D3:H},
"select Col1,count(Col1)
where Col5 matches '"&TEXTJOIN("|", 1, Match!A2:A12)&"'
group by Col1
label count(Col1)''", )

Convert columns to rows and repeat row labels in google sheets

I am trying to convert table 1 to the format in table 2. How can I do it in google sheets ?
Thank you very much.
Table 1 -
Table 2 -
use:
=ARRAYFORMULA(QUERY(TO_TEXT(SPLIT(FLATTEN(
A3:A&"×"&B2:E2&"×"&TEXT(B1:E1, "dd/mm")&"×"&B3:E), "×")),
"where Col4 is not null", ))

Seeking results of multi conditions in multi data column, but each condition value is just one of many in a single cell of google sheet

Please check the file first.
https://docs.google.com/spreadsheets/d/1wYq9BEESpu77wvJzQY1AE4Gmr_PhhaNFSik0ZZt8aD0/edit?usp=sharing
My purpose is:
Generating idea randomly in "Calendar" sheet base on the "Idea" sheet
The concept is:
Selecting the condition about Industry & Quality in B1 & B2 in "Calendar" sheet
Selecting the time will post on each day of week
Then the idea will be shown off based on these conditions.
In this case, any cell can has 2+ values.
We can't split values to single columns because those data can be added more value in future.
try:
=QUERY({RANDARRAY(ROWS(A2:A)), A2:G}, "select Col2 where 9=9 "&
IF(J11="",," and Col3 contains '"&J11&"' ")&
IF(J12="",," and Col4 contains '"&J12&"' ")&
IF(J13="",," and Col5 contains '"&J13&"' ")&
IF(J14="",," and Col6 contains '"&J14&"' ")&
IF(J15="",," and Col7 contains '"&J15&"' ")&
"order by Col1 limit 1")

Autofil columns in one sheet from another only if columns have data AND a specific column has a specific value in Google Sheets

I have a google sheet that autofills rows from another sheet only if the value is a specific column is "approved".
=FILTER(Responses!A:AAC,Responses!D:D="Approved")
Is it possible to combine this to somehow only display columns that aren't blank. So for example if row 1 Column D is "approved", column E is blank, and column F is "data", then the sheet will autopopulate row 1 column D and F but not E. THank you!
try:
=TRANSPOSE(QUERY(TRANSPOSE(
FILTER(Responses!A:AAC, Responses!D:D="Approved")),
"where Col2 is not null", ))
update:
=FILTER(FILTER(Responses!A:AAA, Responses!D:D="Approved"),
TRIM(QUERY(FILTER(Responses!A2:AAA, Responses!D2:D="Approved"),,9^9))<>"")

Multiple Google sheet Querying by date

I have multiple sheets. I want to get the data from these sheets by a date query.
I want the Result sheet as below
try:
=QUERY({Sheet1!A3:B; Sheet2!A3:B};
"select Col1,sum(Col2)
where Col1 is not null
group by Col1
label sum(Col2)''")

Resources