formula help please

Imran Azam

Board Regular
Joined
Mar 15, 2011
Messages
103
Hi Guys

I am trying to fix a formula that i have no idea what it is doing.

the formula is

IF(DATEVALUE(F1)-TRIM(D2)>=0,J11040,IF(DATEVALUE(F1)-TRIM(C2)>0,DATEDIF(C2,F1+30,"m")*E2,0))


below is the data

ABCDEF
1totalmonth numberstartendper month30/04/2016
254.95101/04/201630/04/201654.95

<tbody>
</tbody>

The formula is placed in F1 and its suppose to return some number .

Can any one help explaining what this formula is doing and why is this not working?

Thank you
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
The formula does not work because if you place it in F1, it calls F1 content... so it's a circular reference. I guess it might have to be place in F2.
It seems that the formula tries to calculate how much is being charged so far.
Try this formula in F2, and from there you can see what it does... really don't see why you have TRIM with a date, unless you have day-month month-day format problems, and also DATEVALUE if dates are number, unless you are using text values.

=IF(F1>D2,"EXPIRED",IF(F1>C2,DATEDIF(C2,F1+30,"m")*E2,0))
 
Upvote 0

Forum statistics

Threads
1,215,253
Messages
6,123,891
Members
449,131
Latest member
leobueno

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