chris_bosten
New Member
- Joined
- Aug 21, 2024
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
Hello,
All information has been adjusted for anonymised for privacy purposes.
I have data in the following format
(Supplier, brand and grade are based on data validation list info from a master list of materials we buy)
I have two boxes where users can enter any dates they wish to look at price change information for a specific product
I have three boxes for Supplier, Brand and Grade where users can select which product they wish to look at (all based on data validation)
I then have a data return table with a single row of information for the user to see price movement activity for their chosen material based on the dates they entered:
I have successful array formulas for start period price and end period price based on conditions being met for Supplier, Brand, Grade and Date that looks like this
Start period price: =IFNA(INDEX(G2:G100000,MATCH(1,(D2:D100000=R5)*(A2:A100000=P3)*(B2:B100000=P5)*(C2:C100000=P7),0)),"Price Not Found")
End period price: =IFNA(INDEX(G2:G100000,MATCH(1,(D2:D100000=T5)*(A2:A100000=P3)*(B2:B100000=P5)*(C2:C100000=P7),0)),"No Price Found")
My issue is I only have formulas for closest start date and closest end date, that does not consider Supplier, Brand or Grade. It only considers the dates in Column D:
Closest start date: =INDEX(D2:D100000, MATCH(MIN(ABS(D2:D100000-$K$5)), ABS(D2:D100000-$K$5), 0))
Closest end date: =INDEX(D2:D100000, MATCH(MIN(ABS(D2:D100000-$L$5)), ABS(D2:D100000-$L$5), 0))
For the choices above this returns the following information:
Because I have selected the 18/8/24 for my "period to", the formulas are returning the closest date as 16/8/24 as it is only looking at the dates column. It then cannot find a price as there is no price listed for Revel Calcium Carbonate 6.0mm for the 18th of August, as that entry is for Calcium Carbonate 2.8mm
I want it to return the 14/6/24 which is the closest date to the 18/8/24 (period to selection) for Revel Calcium Carbonate 6.0mm. Then I think the other formulas will work.
Are you able to help?
All information has been adjusted for anonymised for privacy purposes.
I have data in the following format
Supplier (A1) | Brand (B1) | Grade (C1) | Date of Price Change (D1) | Base Unit (E1) | Currency (F1) | New Unit Price (G1) |
Gordon | Flour | W2 | 1/1/24 | Tonne | GBP | 5.75 |
Personage | Cement | CEM II | 1/1/24 | Tonne | GBP | 158.5 |
Revel | Calcium Carbonate | 6.0mm | 1/1/24 | Tonne | GBP | 45.6 |
Revel | Calcium Carbonate | 6.0mm | 14/6/24 | Tonne | GBP | 48.7 |
Revel | Calcium Carbonate | 2.8mm | 1/1/24 | Tonne | GBP | 45.6 |
Revel | Calcium Carbonate | 2.8mm | 18/8/24 | Tonne | GBP |
I have two boxes where users can enter any dates they wish to look at price change information for a specific product
Period From | Period 2 |
1/2/24 (any date can be entered) (K5) | 16/8/24 (any date can be entered) (L5) |
I have three boxes for Supplier, Brand and Grade where users can select which product they wish to look at (all based on data validation)
Supplier (choose from list) | Revel (P3) |
Brand (choose from list) | Calcium Carbonate (P5) |
Grade (choose from list) | 6mm (P7) |
I then have a data return table with a single row of information for the user to see price movement activity for their chosen material based on the dates they entered:
Closest Start Date | Start Period Price | Closest End Date | End Period Price | Period Price % Change | Latest Price | Start to Latest Price % Change |
1/1/24 | 45.6 | 18/8/24 | 48.7 | 6.8 | 48.7 | 68.7 |
I have successful array formulas for start period price and end period price based on conditions being met for Supplier, Brand, Grade and Date that looks like this
Start period price: =IFNA(INDEX(G2:G100000,MATCH(1,(D2:D100000=R5)*(A2:A100000=P3)*(B2:B100000=P5)*(C2:C100000=P7),0)),"Price Not Found")
End period price: =IFNA(INDEX(G2:G100000,MATCH(1,(D2:D100000=T5)*(A2:A100000=P3)*(B2:B100000=P5)*(C2:C100000=P7),0)),"No Price Found")
My issue is I only have formulas for closest start date and closest end date, that does not consider Supplier, Brand or Grade. It only considers the dates in Column D:
Closest start date: =INDEX(D2:D100000, MATCH(MIN(ABS(D2:D100000-$K$5)), ABS(D2:D100000-$K$5), 0))
Closest end date: =INDEX(D2:D100000, MATCH(MIN(ABS(D2:D100000-$L$5)), ABS(D2:D100000-$L$5), 0))
For the choices above this returns the following information:
Closest Start Date | Start Period Price | Closest End Date | End Period Price | Period Price % Change | Latest Price | Start to Latest Price % Change |
01/01/2024 | £45.60 | 18/08/2024 | No Price Found | #VALUE! | No Price Found | #VALUE! |
Because I have selected the 18/8/24 for my "period to", the formulas are returning the closest date as 16/8/24 as it is only looking at the dates column. It then cannot find a price as there is no price listed for Revel Calcium Carbonate 6.0mm for the 18th of August, as that entry is for Calcium Carbonate 2.8mm
I want it to return the 14/6/24 which is the closest date to the 18/8/24 (period to selection) for Revel Calcium Carbonate 6.0mm. Then I think the other formulas will work.
Are you able to help?