I have a spreadsheet where I’m tracking grocery purchases (excerpt attached) and trying to automate when the lowest price was paid and the last time it was purchased. Column A is a list of products; Columns B & C is the last time & Price paid for the item; Columns D & E is the date & lowest price paid for the item; Column F, G, H empty for future use; Columns I onward is the date and price paid.

When purchases are made on a new day, a new column I is inserted, date added to I2 and appropriate items updated with the price., resulting in cells B, C, D, & E being updated if applicable, otherwise remaining untouched. What conditional function tests can be used for cells in Columns B,C,D,and E to test if a cell in Column I is empty, then leave me alone. Otherwise, if the new price in Column I is not empty and is less than the price in Column E, replace the price in Column E and date in Column D.

In the attached spreadsheet I’ve separated each day into a separate sheet showing the expected outcome (i.e. manually overrode data in B,C,D,E as the formulas I used did not produce the output I was looking for.

Initially started with the following range definitions:

Min_Purchase_Price → IF($2022.I5<$2022.E5,$2022.I5,"")

Min_Purchase_Date → IF($2022.E5=$2022.I5,$2022.I$2,"")

Last_Purchase_Price → IF($2022.K5<>””,$2022.K5)

Last_Purchase_Date → IF($2022.I5=””,””,$2022.I$2)

Any help would be appreciated.

InflationTest.ods (15.5 KB)