2017-12-18 160 views
0

我附加了一個示例Google表格數據(Link)。Google表格:查詢功能無法複製數據

它包含2張。 Response工作表包含Google表單的回覆。由於Google表單有很多重複問題,因此我必須使用Query函數(表Transformed單元格B2)轉換數據。查詢命令是

=QUERY(
    { 
    Response!E2:H,Response!B2:D; 
    Response!I2:L,Response!B2:D; 
    Response!M2:P,Response!B2:D; 
    Response!Q2:T,Response!B2:D; 
    Response!U2:X,Response!B2:D; 
    Response!Z2:AC,Response!B2:D; 
    Response!AD2:AG,Response!B2:D; 
    Response!AH2:AK,Response!B2:D; 
    Response!AL2:AO,Response!B2:D; 
    Response!AP2:AS,Response!B2:D; 
    Response!AU2:AX,Response!B2:D; 
    Response!AY2:BB,Response!B2:D; 
    Response!BC2:BF,Response!B2:D; 
    Response!BG2:BJ,Response!B2:D; 
    Response!BK2:BN,Response!B2:D; 
    Response!BP2:BS,Response!B2:D; 
    Response!BT2:BW,Response!B2:D; 
    Response!BX2:CA,Response!B2:D; 
    Response!CB2:CE,Response!B2:D; 
    Response!CF2:CI,Response!B2:D; 
    Response!CK2:CN,Response!B2:D; 
    Response!CO2:CR,Response!B2:D; 
    Response!CS2:CV,Response!B2:D; 
    Response!CW2:CZ,Response!B2:D; 
    Response!DA2:DD,Response!B2:D 
    }, 
    "select * where Col1 <> '' Order By Col6" 
) 

然而,當你在看片Transformed,在山口˚F一些數據(對應Response片上校B)沒有得到轉移。這個問題怎麼解決?

在此先感謝

回答

1

人們常常注意的是,用戶都禁不住一列中混合數據類型。 query()函數會產生不希望的輸出。如果列是用於數字值,那麼只有數字值必須位於該列中。日期欄只能包含日期,而文本欄只能包含文本值。

這並不意味着只要它們是文本格式,數字就不能出現在文本列中。 通常,query()函數將假設列中的單元格類型的數量越多,該數據類型就越多。例如,如果在同一列中有100個數字和20個文本值,則會爲該列假設一個數字值。文本值很可能會被忽略。公式中的細微變化會將所有值轉換爲文本。

看看這有助於

=ArrayFormula(QUERY(to_text({ 
Response!E2:H,Response!B2:D; 
Response!I2:L,Response!B2:D; 
Response!M2:P,Response!B2:D; 
Response!Q2:T,Response!B2:D; 
Response!U2:X,Response!B2:D; 
Response!Z2:AC,Response!B2:D; 
Response!AD2:AG,Response!B2:D; 
Response!AH2:AK,Response!B2:D; 
Response!AL2:AO,Response!B2:D; 
Response!AP2:AS,Response!B2:D; 
Response!AU2:AX,Response!B2:D; 
Response!AY2:BB,Response!B2:D; 
Response!BC2:BF,Response!B2:D; 
Response!BG2:BJ,Response!B2:D; 
Response!BK2:BN,Response!B2:D; 
Response!BP2:BS,Response!B2:D; 
Response!BT2:BW,Response!B2:D; 
Response!BX2:CA,Response!B2:D; 
Response!CB2:CE,Response!B2:D; 
Response!CF2:CI,Response!B2:D; 
Response!CK2:CN,Response!B2:D; 
Response!CO2:CR,Response!B2:D; 
Response!CS2:CV,Response!B2:D; 
Response!CW2:CZ,Response!B2:D; 
Response!DA2:DD,Response!B2:D}),"select * where Col1 <> '' Order By Col6")) 
+0

由於它的工作原理。我理解你的觀點,但對我來說都是絃樂。 – Winston