Macro to update cost value of sales transactions between 2 dates

rajdeepkhurana

New Member
Joined
Aug 29, 2017
Messages
1
Hi Experts,
Heres my query and thank you in advance for your help.

TABLE 1
===
I have a list of sales transactions.
DateItem #RevenueCostProfit
17 feb 2017568$100$7030
18 Feb 2017439$120$130-10
01 Mar 2017439$150$13020

<tbody>
</tbody>

TABLE 2
===
I have another table that records the costs of each item.
Item #Shipping CostDirect CostTotal Cost
5682050$70
4398050$130

<tbody>
</tbody>


I currently use the Index and Match function to fetch the cost of the item # from Table 2


Here's the problem:
Due to changing market, lets say the the cost of procuring item 439 changes. My old profit should not change. How do i fetch the new cost in the subsequent transactions? In my current scenario, if I change the cost for item 439 in Table 2, profit in all previous transactions will change, which is not what i want.

Solution :
What I want is a macro where I input the start date and end date of the sales transactions. It would then update the cost only for those transactions. This way, my old transactions and their profit figures don't change. Can anyone help with this macro?

I would be open to any other suggestions.

Thank you so much!!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,055
Latest member
excelhelp12345

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