Convert Excel formula to Excel

dbazzelle

New Member
Joined
Dec 4, 2003
Messages
38
Hello, would it be possible to convert this formula :

=IF(YEAR(B5)=YEAR(E$1),($D5/(DATEDIF($B5,$C5,"D")+1))*MIN((DATEDIF($B5,$C5,"D")+1),(DATEDIF(B5,EOMONTH(E$1,0),"D"))+1),IF(YEAR(C5)=YEAR(E$1),($D5/(DATEDIF($B5,$C5,"D")+1))*(((DATEDIF(B5,C5,"D")+1)-(DATEDIF(B5,DATE(YEAR(C5)-1,12,31),"D")+1)))))

to work in a calculated field in a query? I know my cell refrences would have to change to table and colum refrences, and I can handle that part. If you look at this post:

http://www.mrexcel.com/board2/viewtopic.php?t=79169&postdays=0&postorder=asc&start=10

you can see what I am working on. Thank you.

David
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi David,
I think so.

You have all the functions in Access (VBA): Datediff, Year, EOMONTH will be replaced by DateSerial with 0 as day.

E.g. dateserial(2004,2,0) returns the last day in January 2004.

Martin
 
Upvote 0

Forum statistics

Threads
1,221,631
Messages
6,160,942
Members
451,679
Latest member
BlueH1

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