+ Reply to Thread
Results 1 to 8 of 8

Formula to subtract two numbers in cell J6

  1. #1
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    217

    Formula to subtract two numbers in cell J6

    In cell J6 there are two numbers "280 - 321" , i need a formula to subtract those numbers, with the right number first subtracting the left number?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    9,159

    Re: Formula to subtract two numbers in cell J6

    Hi Mr. Castle,

    How about...

    =MID(J6,FIND(" - ",J6)+2,LEN(J6))-LEFT(J6,FIND(" - ",J6)-1)
    HTH
    Regards, Jeff

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    10,957

    Re: Formula to subtract two numbers in cell J6

    Are they always three digit numbers? If so, I could see using =RIGHT(J6,3)-LEFT(J6,3).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    217

    Re: Formula to subtract two numbers in cell J6

    Jeff does this formula also works on time such as: "9:20 - 10:31"?

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    9,159

    Re: Formula to subtract two numbers in cell J6

    Not quite, but try...

    =TRIM(MID(J11,FIND(" - ",J11)+2,LEN(J11)))-TRIM(LEFT(J11,FIND(" - ",J11)-1))

    then format as h:mm

  6. #6
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    217

    Re: Formula to subtract two numbers in cell J6

    The formula worked,

    Thank you Jeff

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    9,159

    Re: Formula to subtract two numbers in cell J6

    You are very welcome and thanks for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,789

    Re: Formula to subtract two numbers in cell J6

    You may need to add MOD function

    Format as Custom, h:mm
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v J K
    6 9:20 - 10:30 1:10
    7 9:20 - 10:37 1:17
    8 9:25 - 05:45 20:20
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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