Recently I needed to calculate business days for a given start and end days. But I needed to do this using OOTB calculated field. This formula has to remove Saturdays and Sundays (Weekends) from the given start and end dates. Here I check if dates are inserted. If not I return an empty string. I was struggling with functions in calculated fields and I was not allowed to use SharePoint object model. I tried so many ways and finally came up with the correct formula. I need to thank Sujeewa, who helped me out with the formula. Here is the formula. Happy coding 
=IF(ISERROR(DATEDIF(StartDate,EndDate,"d")),"",(DATEDIF(StartDate,EndDate,"d"))+1
-INT(DATEDIF(StartDate,EndDate,"d")/7)*2
-IF((WEEKDAY(EndDate)-WEEKDAY(StartDate))<0,2,0)
-IF(OR(AND(WEEKDAY(EndDate)=7,WEEKDAY(StartDate)=7),AND(WEEKDAY(EndDate)=1,WEEKDAY(StartDate)=1)),1,0)
-IF(AND(WEEKDAY(StartDate)=1,(WEEKDAY(EndDate)-WEEKDAY(StartDate))>0),1,0)
-IF(AND(NOT(WEEKDAY(StartDate)=7),WEEKDAY(EndDate)=7),1,0))
Please add a comment if you use this code or it helped you. So I can make my posts better.
When you create a lookup field to reference data from another list, you will get a dropdown control to select data from that list. If you select “Allow multiple values” you will get a list box control with two buttons which you can select values. But have you ever seen an editable dropdown OOTB in SharePoint? I don’t think so. If you need to add an editable dropdown then you have to come up with your own custom control.
When you add more than 19 records to the lookup list, SharePoint automatically makes that dropdown list editable. This is because when you have lots of items in the dropdown, It’s very difficult to find an appropriate item. So SharePoint allows you to type in the dropdown and it’s automatically sorted. This is not a bug. This is a feature in SharePoint.
Let’s see some screenshots.
OK… I have two lists. “My Favorite Colours” has a lookup field to “My Colours”
“My Colours” has some colours in the list.
Added the lookup field to “My Favorite Colours” list
When “My Colours” has 19 records, “My Favorite Colours” list’s edit form shows usual dropdown box (Un editable)
But when we added more than 19 it’s automatically gets to editable. You can type and it’s automatically gets sorted according to the typed character.
I know what you think now. Users can type any value and save to the list without checking the lookup values. Don’t worry SharePoint automatically checks the value and show an error message.
Please add a comment if you use this code or it helped you. So I can make my posts better.