索引匹配与更新值按日期范围

发布于 2025-02-11 01:34:33 字数 452 浏览 3 评论 0原文

我有两个表:

  1. 具有3个参数的销售列表的表: 客户,国家和购买日期。
  2. 每个价格的价格和日期范围,

我希望根据价格的日期范围来查看每个销售的更新价格。 我该怎么做?

我想看到第一次销售的1100美元,第二次出售

”

I have two tables:

  1. Table with a list of sales with 3 parameters:
    CustomerID, Country and date of purchase.
  2. Table with prices and Date range for each price

I want to see the updated price for each sale based on the date range of the price.
How Can I do that?

I want to see 1100$ for the first sale and 1200$ to the 2nd sale

Table2

Table1

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

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

发布评论

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

评论(2

最近可好 2025-02-18 01:34:33

公式是:

=SUMIFS($C$2:$C$3;$A$2:$A$3;G2;$B$2:$B$3;H2;$D$2:$D$3;"<="&I2;$E$2:$E$3;">="&I2)

此处的棘手部分是日期标准:您的购买日期必须从日期起更大或等于,并且也必须低于或等于to日期。遵循该逻辑可以帮助您在确切的时间段,国家和客户的确切时间内跟踪价格。

enter image description here

Formula is:

=SUMIFS($C$2:$C$3;$A$2:$A$3;G2;$B$2:$B$3;H2;$D$2:$D$3;"<="&I2;$E$2:$E$3;">="&I2)

The tricky part here is the date criteria: your purchase date must be greater or equal to From Date and must be also lower or equal than To Date. Following that logic can help you out to track the price on a exact time period, country and client.

白云悠悠 2025-02-18 01:34:33

提供您的从日期开始的价格列以上顺序您可以使用索引/匹配:= index($ c $ 2:$ c $ 3,匹配(D6,$ d $ 2:$ d $ 2:$ d $ 3, 1))

1Match> Match函数中告诉它“找到小于或等于Lookup_value的最大值。lookup_array必须放置在上升中命令。”

Providing your Price From Date column is in ascending order you can use INDEX/MATCH: =INDEX($C$2:$C$3,MATCH(D6,$D$2:$D$3,1))

The 1 in the MATCH function tells it to "find the largest value that is less than or equal to lookup_value. Lookup_array must be placed in ascending order."

enter image description here

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