Calculating Travel Days And Not 24 Hour Periods Between Two Dates

TheAssetMgr

Board Regular
Joined
Nov 8, 2011
Messages
63
If I start traveling on 8/1 and stop traveling on 8/3 then I have completed three travel days.

If my start date is in cell A1 and my stop date is in cell B1 what formula can I use to calculate the number of travel days please?

Thanks!
 
Hi Dave, thanks for helping me out with this problem. I'm not understanding what you're trying to tell me with these two tables. Would you please clarify?
 
Upvote 0

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"
1. You may not want a text result; formula with "0" is Text. The text result may yield an error message in a subsequent formula.
If you want a number 0, just specify that in the formula.
2. =(COUNT(A1:B1)=2)*(B1-A1+1) Yields 0 or the number of days.
You can review the components of the formula. Excel's Formula Evaluate may help.
 
Last edited:
Upvote 0
1. You may not want a text result; formula with "0" is Text. The text result may yield an error message in a subsequent formula.
If you want a number 0, just specify that in the formula.
2. =(COUNT(A1:B1)=2)*(B1-A1+1) Yields 0 or the number of days.
You can review the components of the formula. Excel's Formula Evaluate may help.

That formula worked Dave, thank you very much!!
 
Upvote 0
.
I'm suspecting you pasted the macro into a Routine Module by clicking on INSERT from the upper menu, then clicking on MODULE ?

The Sheet Level Module can be accessed by finding the sheet name in the upper left small window ... double click on the name and the large window on the right will be
where you paste the macro code.

Let me know.
 
Upvote 0
I'm nearly certain I pasted it where it should be but I could be mistaken. I was able to complete the work though with the formula Dave sent over so I'm good to go for now.

Thanks much for the assistance on this!
 
Upvote 0

Forum statistics

Threads
1,215,235
Messages
6,123,789
Members
449,126
Latest member
Greeshma Ravi

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