简体   繁体   中英

Maxifs using multiple importrange in Google Sheets

The following code:

=MAX(MAXIFS(IMPORTRANGE("url"),IMPORTRANGE("url"),B9), MAXIFS(IMPORTRANGE("url"),IMPORTRANGE("url"),B9), MAXIFS(IMPORTRANGE("url"),IMPORTRANGE("url"),B9)) 

It is not working.

[mainsheet] [0]: https://docs.google.com/spreadsheets/d/1CuVq262QHv_Lv0WSHjhSvbgolJCWc6TuiaCvNJxA45w

[test1][1] https://docs.google.com/spreadsheets/d/1HoQQQziMuIiIHoWxODG7ixQW5wk4FCK5y5cigACc7Vo

[test2][2]

https://docs.google.com/spreadsheets/d/13Fi516nyXYvLLk3-9KPOMmwaUcyJPUubncs8ONhWT5I

[test3][3]

https://docs.google.com/spreadsheets/d/1zQiDZfoggg0xumix1hpQzaCf5UMc9o0xtkpIHDNA7mc

The problem is not having "multiple" maxifs with importrange . The problem exists with even a single maxifs replying on importrange .

maxifs expects a range and importrange does not satisfy this expectation. Hence the error message "Argument must be a range". The way to manage this is to create a helper range where each the importrange can be imported and the maxifs function applied to the physical range.

This screenshot shows the general idea.
在此输入图像描述

  • Cell J2: =maxifs(A2:A7,B2:B7,C2)
  • Cell J3: =maxifs(D2:D5,E2:E5,F2)
  • Cell J4: =maxifs(G2:G5,H2:H5,I2)
  • Cell J5: =max(J2:J4)

By comparison, cell F8 contains the formula containing the various maxifs and importrange values. The result is an error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM