Friday, November 21, 2008   
  Search   
 
Register  Login  
Forums  
     Minimize  

Welcome to MeraWindows forums.

Thank you for being at the Microsoft Windows Community Site. You may have to register before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  


 
  Microsoft Windows Forums  Microsoft Offic...  Microsoft Excel  Challenge II - Subtracting times
Previous Previous
 
Next Next
New Post 10/1/2008 8:25 AM
User is offline Ashish Mathur
88 posts
www.ashishmathur.com
Member




Challenge II - Subtracting times 

Hi,

Let's say in cell A1, i have 23:50 and in cell A2, i have 00:10.  Now in cell A4, i want to know the difference betweenthe two times.  The answer should be 00:20.

Can you share your solution.


For Microsoft Excel trainings in India, please visit http://ashishmathur.com/training.aspx

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
www.ashishmathur.com

 
New Post 10/1/2008 1:59 PM
User is offline Hyder14
3 posts
Member


Re: Challenge II - Subtracting times 

Hello Ashish,

Hope you are well. One of the many possible approaches may be;

=TEXT(1+TEXT(A2,"##.###########")-TEXT(A1,"##.###########"),"[h]:mm:ss")

The '1' in the above formula can be replaced with the exact difference in days between the actual dates to which these times pertain.

Regards,

Kamran Hyder

 
New Post 10/1/2008 4:04 PM
User is offline Ashish Mathur
88 posts
www.ashishmathur.com
Member




Re: Challenge II - Subtracting times 

Hi,

For simplicity, assume that the two times are just one day apart.  I actually wanted to discuss a shorter formula to achieve this.

I was just inquisitive to know what are the possible solutions.


For Microsoft Excel trainings in India, please visit http://ashishmathur.com/training.aspx

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
www.ashishmathur.com

 
New Post 10/1/2008 6:42 PM
User is offline Vasu Jain
2944 posts
www.cyberDimensions.blogspot.com
Forum Guru






Re: Challenge II - Subtracting times 

ashish we can use modulo in the formula.i dnt knw the exact  syntax but i can only help with the logic.so u can use modulo 12.to get the diiference.for eg 13 modulo 12 is 1.therefore we can frame the difference in the same manner


"There are only '10' types of ppl in dis world. Those who understand BINARY and those who dont."

 
New Post 10/1/2008 7:35 PM
User is offline Ashish Mathur
88 posts
www.ashishmathur.com
Member




Re: Challenge II - Subtracting times 

Hi,

You are quite close.  We can use the following formula

=mod(A2-A1,1)

The logic is actualli quite simple.  Since A2-A1 will give a negative number, the remainder of any negative number is divisor+remainder.

Hope this helps


For Microsoft Excel trainings in India, please visit http://ashishmathur.com/training.aspx

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
www.ashishmathur.com

 
Previous Previous
 
Next Next
  Microsoft Windows Forums  Microsoft Offic...  Microsoft Excel  Challenge II - Subtracting times


   Get Your Own E-Mail Account @MeraWindows.com Minimize  
New Page 1 New Page 1
Show your cool quotient with @merawindows.com email account