如何禁用Arrayformula计算列名

时间:2019-08-09 08:23:29

标签: google-sheets multiple-columns array-formulas google-sheets-query

我正在尝试将公式应用于从表单填充的工作表中的整个列。但是,如果涉及到列,它将使用许多行(例如MT直到QP):OR无效,因为它认为它已成为OR函数。 (因此直到列OQ为止都是无错误的)

我在列名中使用$失败

=arrayformula(query('Formulierreacties 1'!A1:RA; "Select " & 
 join(","; SUBSTITUEREN(ADRES(1; KOLOM(A:G); 4); "1"; "")) & ", " & 
 join(","; SUBSTITUEREN(ADRES(1; KOLOM(MT:QP); 4); "1"; "")) & " where G = 6002"))
  

错误:#WAARDE!

1 个答案:

答案 0 :(得分:0)

您需要转义 OR 列,如`OR`

=ARRAYFORMULA(QUERY('Formulierreacties 1'!A1:RA; 
 "select "&JOIN(","; SUBSTITUTE(ADDRESS(1; COLUMN(A:G); 4); 1; ))&","&
  JOIN(","; SUBSTITUTE(SUBSTITUTE(ADDRESS(1; COLUMN('Formulierreacties 1'!MT:QP); 4); 1; ); "OR"; "`OR`"))&"
  where G = 6002"; 1))

0