+ Reply to Thread
Results 1 to 5 of 5

How I can do difference between two excel cells with customized formatting ?

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2016
    Posts
    118

    How I can do difference between two excel cells with customized formatting ?

    Hello,

    I want to make a difference between two cells (excel 2003 compatibility), each cell is formatted as follows:

    12.10.2015 02:15
    14.10.2015 16:45

    where the date above is formatted like this: dd.mm.yyyy h:mm

    I would like the difference between the two cells to be displayed as, eg. 48.5 hours (the word "hours" I will place it in an adjacent column).

    Please!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: How I can do difference between two excel cells with customized formatting ?

    Perhaps =(A2-A1)*24&" hours" and format result as General

  3. #3
    Forum Contributor
    Join Date
    11-10-2011
    Location
    Bucharest, RO
    MS-Off Ver
    Excel 2016
    Posts
    118

    Re: How I can do difference between two excel cells with customized formatting ?

    The above formula does not lead to the result that I wants to get it. Other ideas, please!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: How I can do difference between two excel cells with customized formatting ?

    Quote Originally Posted by public View Post
    The above formula does not lead to the result that I wants to get it. Other ideas, please!
    Can you explain why not?

    Perhaps...
    B
    1
    10/12/2015 2:15
    2
    10/14/2015 16:45
    3
    62:30:00

    B3=B2-B1
    Formatted at Time and then use the setting tha shows 37:30:55
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: How I can do difference between two excel cells with customized formatting ?

    Using FDibbins's image above try using the following in cell B3 or whichever cell you want to display the result.

    Please Login or Register  to view this content.
    The result will be 62.5 hours
    Thanks,
    HangMan

    You can say "Thank you!" by clicking Add Reputation below the post.
    Please, mark your thread [SOLVED] if you are happy with the solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 11-30-2015, 03:58 PM
  2. [SOLVED] Conditional formatting based on the difference value between figures in two cells
    By Karczoch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2014, 07:50 AM
  3. Conditional Formatting based on difference in Cells
    By QuietLife in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-26-2013, 06:25 AM
  4. Conditional Formatting help - based on difference between two cells
    By oscarbunny in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2012, 10:00 AM
  5. Customized macro to export cells to txt files?
    By Handyy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2010, 09:27 AM
  6. Replies: 0
    Last Post: 10-07-2008, 10:45 PM
  7. [SOLVED] I want to select excel cells of difference colors and increase th.
    By Wilbanks in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-30-2005, 10:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1