床单标题行arrayformula以根据作业的周转和收到的日期在日期范围内查找费率

发布于 2025-01-28 04:21:16 字数 5234 浏览 1 评论 0原文

我有一个带有两个表格的Google表工作簿: jobs

ABCDE
1周转接收到速率Pages/strong>
2标准12/2/2021$ 0.40204$ 81.60
3Rush12/9/2021$ 0.6079$ 47.40 $ 47.40
4Rush12/29/29/ 2021$ 0.6024$ 14.40
5标准1/1/20220.4581$ 36.45
6标准1/2/2022$ 0.4513761.65
$$ /2022$ 0.4595$ 42.75
8标准1/15/2022$ 0.45162$ 72.90

ABCD
1周转基本率开始日期结束日期
2标准$ 0.409/1/202112/31/2021
3Rush$ 0.608/17/20186/10/2022
4加快$ 0.808/17 /20186/10/2022
5每日$ 1.008/17/20186/10/2022
6标准$ 0.451/1/20226/10/2022

我试图在工作中使用arrayformula!或价格的开始日期之间!

这个想法是,费率可能会随着时间的推移而变化,但是工作总计仍将使用每个作业进入时的正确速率来计算。

我知道我不能使用arrayformula使用sumifs,所以我尝试使用查询,但这只会填充第一份工作的费率。

={"Rate"; 
ARRAYFORMULA(QUERY(Rates!A:D, 
"select B where A contains '"&Jobs!A2:A
&"' and C < date'"&TEXT(Jobs!B2:B, "YYYY-MM-DD")
&"' and D > date'"&TEXT(Jobs!B2:B, "YYYY-MM-DD")&"'",0))}

如果需要,我可以添加助手列。我试图避免在添加作业时必须手动填充该列的公式。

这是工作簿的链接:

感谢对此的任何帮助。

I've got a Google Sheets workbook with two sheets: Jobs

ABCDE
1TurnaroundReceivedRatePagesTotal
2Standard12/2/2021$0.40204$81.60
3Rush12/9/2021$0.6079$47.40
4Rush12/29/2021$0.6024$14.40
5Standard1/1/2022$0.4581$36.45
6Standard1/2/2022$0.45137$61.65
7Standard1/5/2022$0.4595$42.75
8Standard1/15/2022$0.45162$72.90

Rates

ABCD
1TurnaroundBase RateStart DateEnd Date
2Standard$0.409/1/202112/31/2021
3Rush$0.608/17/20186/10/2022
4Expedited$0.808/17/20186/10/2022
5Daily$1.008/17/20186/10/2022
6Standard$0.451/1/20226/10/2022

I'm trying to use an ARRAYFORMULA in Jobs!C1 to look up the value in Rates!B:B where the Turnaround in Jobs!A:A matches the Turnaround in Rates!A:A and the Date Received in Jobs!B:B falls on or between the Start Date in Rates!C:C and End Date in Rates!D:D.

The idea is that rates may change over time, but the job totals will still calculate using the correct rate at the time each job came in.

I know I can't use SUMIFS with ARRAYFORMULA, so I tried using QUERY, but this only populates the rate for the first job.

={"Rate"; 
ARRAYFORMULA(QUERY(Rates!A:D, 
"select B where A contains '"&Jobs!A2:A
&"' and C < date'"&TEXT(Jobs!B2:B, "YYYY-MM-DD")
&"' and D > date'"&TEXT(Jobs!B2:B, "YYYY-MM-DD")&"'",0))}

I'm okay with adding helper columns if needed. I'm trying to avoid having to manually fill the formula down the column as jobs are added.

Here is a link to the workbook:
Job Rate Lookup By Turnaround + Date Range

I appreciate any help on this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

睡美人的小仙女 2025-02-04 04:21:16

尝试:

={"Rate"; ARRAYFORMULA(IFNA(VLOOKUP(A2:A&B2:B, SORT({
 FILTER(Rates!A2:A, Rates!A2:A<>"")&Rates!C2:C, Rates!B2:B}, Rates!C2:C, 1, Rates!A2:A, 1), 2, 1)))}

try:

={"Rate"; ARRAYFORMULA(IFNA(VLOOKUP(A2:A&B2:B, SORT({
 FILTER(Rates!A2:A, Rates!A2:A<>"")&Rates!C2:C, Rates!B2:B}, Rates!C2:C, 1, Rates!A2:A, 1), 2, 1)))}

enter image description here

时光瘦了 2025-02-04 04:21:16

使用arrayformula时,您将无法使用QUERY以获取全部值数组,因为它只会返回找到的第一个值。

我创建了一个使用vlookup匹配值的公式,但是我必须从jobs中从标准>标准中修改名称 标准2 。

这是公式:

=IFERROR(ARRAYFORMULA(VLOOKUP(A2:A,Rates!A2:D6,2,0)))

这些是结果:

”在此处输入图像说明”

When using ARRAYFORMULA you won't be able to use QUERY in order to get the whole array of values as it will only return the first value that is found.

I created a formula that matches the value using VLOOKUP however I had to modify the name in Jobs from Standard to Standard 2.

This is the formula:

=IFERROR(ARRAYFORMULA(VLOOKUP(A2:A,Rates!A2:D6,2,0)))

These are the results:

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文