Container Warehouse Storage

TripleJays

New Member
Joined
Nov 22, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I need to calculate storage days for containers being stored in our depot. We bill weekly so if a container is still in storage for the full week of the billing period, I would need a result of 7 days and if it was collected during the week then I need the partial days automatically calculated. If the container was collected prior to the billing period, I need a result of 0.

1669171696792.png


In this example
* Row16 - correct
* Row17- Should be 7 and then 3 in column x (=10 days)
* Row18 - Should be 2 days

Date in / date out = 1 day

I am using =IF(E16>0,E16-$Y$14 + 1,$Y$15-$Y$14+1). I have spent hours googling, trying to work this out myself and would greatly appreciate any help.

I also have customers that have a number of free days that would be in column c, so if anyone could help including this in the formula too.

Thanks :)
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
There is a nearly undocumented function called DATEDIF that's an old holdover from Lotus 123 compatibility that might be of help.
Book1
ABC
112/01/202212/07/20226
Sheet1
Cell Formulas
RangeFormula
C1C1=DATEDIF(A1,B1,"d")

When you type "datedif" you can't even hit [Tab] to start the function - it has to be typed, however once the open parentheses is there, it does appear and the name can be clicked for help
1670445786733.png

Complete help will appear when you click on DATEDIF, and can also be found here.

I don't understand why the function isn't officially supported. Granted, you can get the same answer by doing simple subtraction, but to get months or years gets tricky, and sometimes it just fits better.
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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