Cubist
Well-known Member
- Joined
- Oct 5, 2023
- Messages
- 1,803
- Office Version
- 365
- Platform
- Windows
- MacOS
Hi,
I have a lookup table on the left and data on the right. I'm wondering what's the best way to return the values (A, B, C, D) if the date is in the range on the left. If not found, return 0.
I have a lookup table on the left and data on the right. I'm wondering what's the best way to return the values (A, B, C, D) if the date is in the range on the left. If not found, return 0.
Book1.xlsm | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Begin Date | End Date | Return | Date | Return | |||
2 | 2/1/21 | 1/31/22 | A | 5/31/19 | ||||
3 | 2/1/22 | 1/31/23 | B | 6/30/19 | ||||
4 | 2/1/23 | 1/31/24 | C | 7/31/19 | ||||
5 | 2/1/24 | 1/31/25 | D | 8/31/19 | ||||
6 | 9/30/19 | |||||||
7 | 10/31/19 | |||||||
8 | 11/30/19 | |||||||
9 | 12/31/19 | |||||||
10 | 1/31/20 | |||||||
11 | 2/29/20 | |||||||
12 | 3/31/20 | |||||||
13 | 4/30/20 | |||||||
14 | 5/31/20 | |||||||
15 | 6/30/20 | |||||||
16 | 7/31/20 | |||||||
17 | 8/31/20 | |||||||
18 | 9/30/20 | |||||||
19 | 10/31/20 | |||||||
20 | 11/30/20 | |||||||
21 | 12/31/20 | |||||||
22 | 1/31/21 | |||||||
23 | 2/28/21 | |||||||
24 | 3/31/21 | |||||||
25 | 4/30/21 | |||||||
26 | 5/31/21 | |||||||
27 | 6/30/21 | |||||||
28 | 7/31/21 | |||||||
29 | 8/31/21 | |||||||
30 | 9/30/21 | |||||||
31 | 10/31/21 | |||||||
32 | 11/30/21 | |||||||
33 | 12/31/21 | |||||||
34 | 1/31/22 | |||||||
35 | 2/28/22 | |||||||
36 | 3/31/22 | |||||||
37 | 4/30/22 | |||||||
38 | 5/31/22 | |||||||
39 | 6/30/22 | |||||||
40 | 7/31/22 | |||||||
41 | 8/31/22 | |||||||
42 | 9/30/22 | |||||||
43 | 10/31/22 | |||||||
44 | 11/30/22 | |||||||
45 | 12/31/22 | |||||||
46 | 1/31/23 | |||||||
47 | 2/28/23 | |||||||
48 | 3/1/23 | |||||||
Sheet1 |