+ Reply to Thread
Results 1 to 12 of 12

How to subtract single cells with double digits into a single digit of a single cell.

  1. #1
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    How to subtract single cells with double digits into a single digit of a single cell.

    Hey guys, I am attempting to take a cell with a double digit in it and have it subtract one number from the other. Say i have 25 in a cell i need the answer to be 3. Or if it's 52 in a cell i need the answer to be 3. Whatever double digit is in the cell i need it to find the larger and subtract the smaller one from it. Is there any way possible to do this at all.

    PLEASE PLEASE HELP WITH THIS!!!!!!! IT'S DRIVING ME CRAZY!!!!!!!!!

    THANK YOU, THANK YOU, THANK YOU, THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    Assuming your data is in A1, then =ABS(LEFT(A1,1)-RIGHT(A1,1))

  3. #3
    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,933

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    try this, assuming your number is in A1...

    =ABS(VALUE(LEFT(A1,1))-VALUE(RIGHT(A1,1)))
    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

  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,933

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    lol JJ is there an echo in here?

  5. #5
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    THANK YOU!!!! THANK YOU!!! THANK YOU!!!!
    Why yall guys and gals gotta make it look so easy?????
    THANK YOU VERY, VERY MUCH JieJenn!!!!!!!!!!!!!!!
    Can't thank you enough!!!!!

  6. #6
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    Thanks again FD for jumping in again with me!!!!! You guys are all just the best!!!!
    I'll give you the same praise.
    THANK YOU, THANK YOU, THANK YOU!!!!!
    You're all amazing!!!!!

  7. #7
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    Ok. Almost there. Sorry, i didn't think if one digit was a 0. Say it was 30 then I'd need 7. Or 20, i'd need 8. Is there something i could incorporate in with that or how would i do that. I am sorry for being such a bother. This has just been driving me crazy.
    Thank you again so much!!!!

  8. #8
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    Maybe

    =ABS(LEFT(A1,1)-IF(RIGHT(A1,1)="0",10,RIGHT(A1,1)))

  9. #9
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    ABSOLUTELY GREAT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    PERFECT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    THANK YOU AND THANK YOU AND THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    It works perfect!!!!!!!!!!!!!!! Thank you so much!!!!!!!!!!!!!!!!!!

  10. #10
    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,933

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    =abs(value(left(a1,1))-if(value(right(a1,1))=0,10,value(right(a1,1))))

    edit: ok well pretty much the same again

  11. #11
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    And another huge THANK YOU to you FD!!! You guys really are helping me out with this!!! Can't thank you enough!!!
    Your all just awesome!!!!

    I'm saving them all. So i can try to break them down and see how they work. So i don't have to keep bothering ya'll.
    Thanks so much!!!!

  12. #12
    Registered User
    Join Date
    03-11-2021
    Location
    Jakarta, Indonesia
    MS-Off Ver
    2019
    Posts
    2

    Re: How to subtract single cells with double digits into a single digit of a single cell.

    ah, i Got it. Everyone give similar answer. Thanks for your question bro

+ 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