Counting formula

sangeeta25

Board Regular
Joined
Jun 15, 2015
Messages
59
Hi everyone!

I need help with a formula to do the following action below...

I have column A which says "date in" and column B which says "date out" and then column C which says "number of days"

So what I would like to have is when someone puts in a date in say cell a3, the date being 14/05/2016 and then puts in a date (for date out) in cell b3, the date being 17/05/2016, I would then like for cell C3 to count the days between cell a3 and b3 including the day in a3, so c3 will automatically calculate the number 4 because between the 14th and 17th including the 14th is 4 days.

Can someone please assist?

Thank you in advance!!!

S
 
try this in C3

=IF(COUNT(A3:B3)=2,B3-A3+1,"")
 
Upvote 0
Assuming date in is in A3 and date out is in B3, then C3 could be =B3-A3+1, formatted to a NUMBER so it won't show a date.
 
Upvote 0
Hi AlanY

Thanks again for the formula, is there any way the formula can be amended so that weekends (Saturdays and Sundays) are not included in the count?
 
Upvote 0
try this

=IF(COUNT(A3:B3)=2,NETWORKDAYS(A3,B3),"")
 
Upvote 0

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