+ Reply to Thread
Results 1 to 6 of 6

LAST 4 digit ( minus ) FIRST 4 digit

  1. #1
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,626

    LAST 4 digit ( minus ) FIRST 4 digit

    I have this text on a1 1501 - 1520

    Cell b1 I need answer 20 , that is 1520 minus 1501 ( + 1 )

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: LAST 4 digit ( minus ) FIRST 4 digit

    Try this in B1
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: LAST 4 digit ( minus ) FIRST 4 digit

    Hi,

    If the numeric values are in the same format across, try the following:

    =RIGHT(A1,4)-LEFT(A1,4)+1

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

    Re: LAST 4 digit ( minus ) FIRST 4 digit

    or in case if your numbers are not always 4 digit each.

    =REPLACE(A1,1,FIND("-",A1),"")-LEFT(A1,FIND("-",A1)-1)+1

    Data Range
    A
    B
    1
    1501 - 1520
    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

  5. #5
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,626

    Re: LAST 4 digit ( minus ) FIRST 4 digit

    Thank you all works as needed , will also collect that of
    ALKEY maybe will need it else where

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: LAST 4 digit ( minus ) FIRST 4 digit

    You're welcome, glad it worked for you.

+ 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. [SOLVED] Color a single digit in a mult-digit number cell
    By Phyllis in forum Excel General
    Replies: 8
    Last Post: 09-30-2022, 04:22 PM
  2. Replies: 10
    Last Post: 09-26-2015, 04:19 PM
  3. Macro to identify 3-digit and 4-digit numbers as valid dates
    By gojakie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2015, 08:16 AM
  4. Replies: 4
    Last Post: 03-07-2015, 12:03 PM
  5. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  6. Replies: 2
    Last Post: 06-17-2010, 08:36 PM
  7. Replies: 1
    Last Post: 02-18-2005, 10:06 AM

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