New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Calculate Date Between Two Date

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

Calculate Date Between Two Date

Postby chaitanya_p » Tue Jul 12, 2016 12:03 am

Hello,

Start date Start time End date End time Difference in Days
01.05.2016 04.25 PM 01/05/2016 06.15 PM ---
Blank Cell 06/05/2016 11.00 AM 05 DAYS (Expected Result)
02.05.2016 08.50 AM 02/05/2016 09.00 AM ---
Blank Cell 03/05/2016 09.00 AM ---
Blank Cell 09/05/2016 09.00 AM ---
Blank Cell 15/05/2016 06.20 PM 13 DAYS (Expected Result)

Please help me in above question.

I have attached one excel file in that file there is some data and also there is expected result is also given, but i want the formula so that we can do it quickly.
  • 0

You do not have the required permissions to view the files attached to this post.
chaitanya_p
Rookie
 
Posts: 4
Joined: Jul 11, 2016
Reputation: 0
Excel Version: 2007

Re: Calculate Date Between Two Date

Postby Kevin UK » Tue Jul 12, 2016 1:18 am

So, what is the expected result?
  • 0

Regards

Kevin
Kevin UK
Excel Master
 
Posts: 568
Joined: Jun 24, 2012
Reputation: 86
Excel Version: 2016

Re: Calculate Date Between Two Date

Postby chaitanya_p » Tue Jul 12, 2016 3:36 am

Please check attachment that I have provided, In that result is calculated manually but I want that by formula.....

No of days between two dates, if there is empty cell then that cell could not be conisdered

In Cell A2 : 01.05.2016 (Start Date) In cell B2 : 01.05.2016 (End Date), So no. of days are : 0

Now question is :

In Cell A3 : 02.05.2016 (Start Date) In cell B3 : 02.05.2016 (End Date) but task is not completed,
Cell A4 is blank ----- again in Cell B4 : 03.05.2016 (End Date) but still task is not completed,
Cell A5 is blank ----- again in Cell B5 : 15.05.2016 (End Date) now the task is completed.

So I want to calculate date between B5-A3 how is it possible ?
  • 0

chaitanya_p
Rookie
 
Posts: 4
Joined: Jul 11, 2016
Reputation: 0
Excel Version: 2007

Re: Calculate Date Between Two Date

Postby Kevin UK » Thu Jul 14, 2016 2:02 am

Hi

See the attached in D2 and copied down:

Code: Select all
=IF(AND(A2="",A3=""),0,IF(A2="",B2-LOOKUP(20^20,A$2:A2),B2-A2))
  • 0

You do not have the required permissions to view the files attached to this post.
Regards

Kevin
Kevin UK
Excel Master
 
Posts: 568
Joined: Jun 24, 2012
Reputation: 86
Excel Version: 2016

Re: Calculate Date Between Two Date

Postby chaitanya_p » Sat Jul 16, 2016 1:01 am

Kevin UK wrote:Hi

See the attached in D2 and copied down:

Code: Select all
=IF(AND(A2="",A3=""),0,IF(A2="",B2-LOOKUP(20^20,A$2:A2),B2-A2))


Thank you very much, I will contact you futher if there is any requirement......

Thank you once again......
  • 0

chaitanya_p
Rookie
 
Posts: 4
Joined: Jul 11, 2016
Reputation: 0
Excel Version: 2007


Return to General Excel Questions

Who is online

Users browsing this forum: No registered users and 27 guests