Calculate the saving made on historic purchased items

lolita94

New Member
Joined
Oct 21, 2018
Messages
1
Hello everyone :),

I would like to get your help for the following:

This table shows the items that have been purchased during the year. My objective is calculate how many we saved when we purchased each item (I'm trying to compare each time the price of the last purchase with the current one).

Purchase OrderDateItemQuantityPrice
A15612/01/2018A121.2
A59705/02/2018B525.1
A85601/03/2018D613.75
A25128/04/2018E2150
A98730/04/2018A10.95
A30212/05/2018C1089.57
A20125/06/2018B922.65
A87519/07/2018A70.75
A93521/08/2018E3135
A156

<tbody>
</tbody>
11/09/2018C589.57
A30723/10/2018D1511.5

<tbody>
</tbody>

I tried to get the first purchase date for each item and the price :

ItemFirst purchase datePrice
A12/01/20181.2
B05/02/201825.1
D01/03/201813.75
E28/04/2018150
A30/04/20180.95
C12/05/201889.57

<tbody>
</tbody>

I put in the 2nd column :

=MIN(IF(Tableau1[Item]=Feuil2!A2;Tableau1[Date])) (Ctrl+Shift+enter)

And for the last column :

=SUMIFS(Tableau1[Unit Price];Tableau1[Item];Feuil2!A2;Tableau1[Date];Feuil2!B2)


I need to go back again to my initial table to calculate the price difference between each line and the last purchase price to see how we save each time.

The problem is I need to know how we saved when the item is repeated for the 3rd time, for example item 'A' we saved (1.2-0.95=0.25)

I need to capture the next saving which is (0.95-0.75=0.2); the same thing for all the lines on my initial table.

Is there a way to do it only with formulas or do I need to use VBA coding ?

Thank you in advance.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,897
Messages
6,122,141
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top