Calculate Rate based on latest Date

Negi1984

Board Regular
Joined
May 6, 2011
Messages
199
Hi All,


I have below columns :-

1) Posting Date(Column I)
2) Total quantity(Column U)
3) Value in Obj. Crcy(Column V)
4) ESIGNAM(Column AG)


Now in column AK I want to below mentioned logic :-

For example A is repeated 3 time with 3(1-jan, 2-jan,3-jan) different posting dates, then I have to take latest date which is 3rd jan, now pick its corresponding Total qty and Value in Obj curr then divide it and paste that output corresponding to all the cells wherever A is mentioned. Note if 03-jan for "A" qty is 0 or blank then we will take max date for A based on 02-jan posting date and new rate for A will be 222.33 (i.e " 3335/15")


Please find the link for sample file https://1drv.ms/x/s!Ap80Ku6M2Tw5gUR8CsSGUM4iEqDc

Can anybody suggest me a macro code
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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