Hey thanks for the response, i will try this and see if it works for me.Could you use something like this?
Make a table like I have in columns BA:BC. This table records the date that each item changes price and what that ne price is. This column could even be on a different worksheet.
Notice that the values in the bright blue cells in row 13 are actually dates but I have formatted them to just show the day.
The formulas in row19 look up the latest price as at the date in row 13 and multiply by the quantities in rows 14:18
24 04 02.xlsm
E F G H I J K L M AZ BA BB BC 1 Item Date Price 2 APPLE 1/01/2024 50 3 ORANGE 1/01/2024 30 4 POTATOES 1/01/2024 54 5 SPINACH 1/01/2024 32 6 EGGPLANT 1/01/2024 12 7 SPINACH 2/01/2024 33 8 APPLE 3/01/2024 55 9 APPLE 5/01/2024 57 10 11 12 13 ITEM DATE : 1 2 3 4 5 14 APPLE QTY 5 5 5 1 15 ORANGE QTY 32 3 1 16 POTATOES QTY 4 1 17 SPINACH QTY 52 4 1 18 EGGPLANT QTY 5 2 1 19 DAY TOTAL 2934 306 431 275 186 20 Changing price
Cell Formulas Range Formula H19:L19 H19 =LET(BA,$BA2:$BA1000,BB,$BB2:$BB1000,SUMPRODUCT(H14:H18,VLOOKUP($E14:$E18,FILTER($BA2:$BC1000,BB=MAXIFS(BB,BB,"<="&H13,BA,BA)),3,0)))
it says that the function is invalid. i copy pasted the same thing you posted.Could you use something like this?
Make a table like I have in columns BA:BC. This table records the date that each item changes price and what that ne price is. This column could even be on a different worksheet.
Notice that the values in the bright blue cells in row 13 are actually dates but I have formatted them to just show the day.
The formulas in row19 look up the latest price as at the date in row 13 and multiply by the quantities in rows 14:18
24 04 02.xlsm
E F G H I J K L M AZ BA BB BC 1 Item Date Price 2 APPLE 1/01/2024 50 3 ORANGE 1/01/2024 30 4 POTATOES 1/01/2024 54 5 SPINACH 1/01/2024 32 6 EGGPLANT 1/01/2024 12 7 SPINACH 2/01/2024 33 8 APPLE 3/01/2024 55 9 APPLE 5/01/2024 57 10 11 12 13 ITEM DATE : 1 2 3 4 5 14 APPLE QTY 5 5 5 1 15 ORANGE QTY 32 3 1 16 POTATOES QTY 4 1 17 SPINACH QTY 52 4 1 18 EGGPLANT QTY 5 2 1 19 DAY TOTAL 2934 306 431 275 186 20 Changing price
Cell Formulas Range Formula H19:L19 H19 =LET(BA,$BA2:$BA1000,BB,$BB2:$BB1000,SUMPRODUCT(H14:H18,VLOOKUP($E14:$E18,FILTER($BA2:$BC1000,BB=MAXIFS(BB,BB,"<="&H13,BA,BA)),3,0)))
i am using microsoft 365, i had a feeling i might be using an older version so i updated it yesterday and still it didnt work, i will use this formula and see if it worksCan you confirm that you are using Microsoft 365?
Perhaps you are using different regional settings/version? What happens if you try this formula
=LET(BA;$BA2:$BA1000;BB;$BB2:$BB1000;SUMPRODUCT(H14:H18;VLOOKUP($E14:$E18;FILTER($BA2:$BC1000;BB=MAXIFS(BB;BB;"<="&H13;BA;BA));3;0)))
it says something is wrong with the formulaCan you confirm that you are using Microsoft 365?
Perhaps you are using different regional settings/version? What happens if you try this formula
=LET(BA;$BA2:$BA1000;BB;$BB2:$BB1000;SUMPRODUCT(H14:H18;VLOOKUP($E14:$E18;FILTER($BA2:$BC1000;BB=MAXIFS(BB;BB;"<="&H13;BA;BA));3;0)))
Is that what it said for the post 10 formula too?it says something is wrong with the formula
yes i did that earlier, it gave me an error saying that "That function isn't valid", i think i have posted a screenshot in one of my replies. And it was highlighting the table_array in the Vlookup function, in which you have put the filter function.Is that what it said for the post 10 formula too?
Try this
What happens then?
- Start a blank worksheet
- In post #10, click this icon in the top left of my Mini Sheet: View attachment 109449
- Select cell E1 in the new blank worksheet
- Paste
yes i did that earlier, it gave me an error saying that "That function isn't valid", i think i have posted a screenshot in one of my replies. And it was highlighting the Filter function.
i did some googling and found out that if i get the filterxml, while typing filter, it means im using an older an older version of excel. But i have updated microsoft 365 to the latest version and i just checked again, it says that its up to date. Just FYI im using the home and student 2019 versionIs that what it said for the post 10 formula too?
Try this
What happens then?
- Start a blank worksheet
- In post #10, click this icon in the top left of my Mini Sheet: View attachment 109449
- Select cell E1 in the new blank worksheet
- Paste
Those two red comment are contradictory. You are either using Microsoft 365 or you are using Excel 2019. They are different products.But i have updated microsoft 365 to the latest version and i just checked again, it says that its up to date. Just FYI im using the home and student 2019 version
It also contradicts your user profilei am using microsoft 365