相关疑难解决方法(0)

Google表格查询-两个范围之间的笛卡尔联接

我们如何使用查询功能在Google Spreadsheet上的两个范围之间实现以下联接?

范围1

Model   Style
Nissan  Coupe
Nissan  Truck
Honda   Sedan
Honda   Hatchback
Toyata  Truck
Honda   Coupe
Run Code Online (Sandbox Code Playgroud)

范围2

Style       Engine
Coupe       1200 cc
Coupe       1500 cc
Sedan       1000 cc
Truck       2000 cc
Sedan       1800 cc
Hatchback   800 cc
Run Code Online (Sandbox Code Playgroud)

输出量

Model   Style       Engine
Nissan  Coupe       1200 cc
Nissan  Coupe       1500 cc
Honda   Sedan       1000 cc
Nissan  Truck       2000 cc
Honda   Sedan       1800 cc
Honda   Hatchback   800 cc
Honda   Coupe       1200 cc
Honda   Coupe       1500 cc
Toyata  Truck       2000 cc
Run Code Online (Sandbox Code Playgroud)

google-sheets google-sheets-api google-sheets-query

4
推荐指数
1
解决办法
2436
查看次数

如何在 Google Sheets 公式中实现递归?

在许多问题中,简洁的递归算法优于迭代实现。我过去曾在 Apps 脚本函数中使用过递归,但现在想找到一种在普通 Google Sheets 公式中使用递归的方法。

我尝试lambda()在 中定义一个函数let(),并且可以多次调用该函数:

=let( 
  fn_, lambda(v, v + 42), 
  x, fn_(1), 
  y, fn_(2), 
  z, fn_(3), 
  { x, y, z } 
)
Run Code Online (Sandbox Code Playgroud)

但这是重用而不是递归。如何使 Google 表格公式中的函数以递归方式调用自身?

recursion google-sheets google-sheets-formula

3
推荐指数
1
解决办法
701
查看次数