Imran Azam

Board Regular
Joined
Mar 15, 2011
Messages
103
HI guys

i been given a spreadsheet at work and there is a formula that i dont understand

the formula is =IF(DATEVALUE(E$1)-TRIM(A2)>=0,B2,IF(DATEVALUE(E$1)-TRIM(C2)>0,DATEDIF(C2,E$1+30,"m")*D2,0))

the data s below
1ABCDE
2end datepricestart dateper month30/06/2016
331/12/20154498.1601/1020151499.394498

<tbody>
</tbody>

the formula is in E3 and the output is in bold.

Can anyone explain to me what this formula is doing?

Thank you

Regards

Imran
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
If the date in E1 (30/06/2016) is same as or after the end date (A2, 31/12/2015), then put B2 (4498.16) in E2, else if the Date in E1 is after the start date (C2) (and before the end date), then multiply D2 (1499.39) by the complete months between E1 and C2 and put the result in E2.

Btw, I think what you called E3 is actually E2.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,510
Members
448,967
Latest member
screechyboy79

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