問題描述
如何將日期後的第一個值從一個選項卡拉到谷歌表格中的另一個選項卡中? (How to pull the first value after a date from one tab into another in google sheets?)
我在谷歌表格中有一個標籤,其中包含每週股票價格數據(列是日期和價格)。我有另一個帶有一些信號(日期和多頭入場價格)的標籤。
我想在第一張表(多頭入場)中添加一列,將信號標籤中的第一個多頭入場價格拉入在信號日期和收盤日期之後(和之間)的行。
例如,在價格中,我有:
date | price
2006‑01‑01 | 30.00
2006‑01‑07 | 31.00
2006‑01‑14 | 32.00
2006‑01‑21 | 33.00
2006‑01‑28 | 34.00
在信號中,我有:
date | entry_price
2006‑01‑03 | 33.30
2006‑01‑12 | 32.10
我想要:
date | price | entry_price
2006‑01‑01 | 30.00 |
2006‑01‑07 | 31.00 | 33.30
2006‑01‑14 | 32.00 | 32.10
2006‑01‑21 | 33.00 | 32.10
2006‑01‑28 | 34.00 | 32.10
看看它在 2006 年 1 月 1 日如何沒有入場價格?那是因為1/3之前沒有信號。看看 1/12 信號的入場價格如何用於 1/14、1/21/ 和 1/28?那是因為那是最後一個信號之後的第一個日期。
(by Brett Elliot、player0)