+ Reply to Thread
Results 1 to 12 of 12

Excel Formula to seperate date by a "." delimeter

  1. #1
    Registered User
    Join Date
    01-25-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    14

    Excel Formula to seperate date by a "." delimeter

    Hello,

    I am trying to separate data within a cell based on the "." delimeter.

    I am using IP Addresses and am able to pull the 1st and second octet information with no problem. Where I am having problems is correctly pulling the 3rd octect information

    Here is the formula I am using: =RIGHT(L2,LEN(L2) - SEARCH(".", L2, SEARCH(".", L2) + 1))

    I just cant get the information to pull correctly!!!
    Attached Files Attached Files

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Excel Formula to seperate date by a "." delimeter

    I find the substitute combined with find the most helpfull to find 2nd to n-th occurrance.
    only thing to keep in mind is to use a character that is real sure of not being part of any of the text strings to separate, in this case pipe-symbel will do

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-25-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Excel Formula to seperate date by a "." delimeter

    Quote Originally Posted by Roel Jongman View Post
    I find the substitute combined with find the most helpfull to find 2nd to n-th occurrance.
    only thing to keep in mind is to use a character that is real sure of not being part of any of the text strings to separate, in this case pipe-symbel will do

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    What am I doing wrong..??? This formula errors out...Error 2-11-19.PNG

  4. #4
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Excel Formula to seperate date by a "." delimeter

    sorry, I missed a semi colon as formula separator.. should have used a converter

    try this one..

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-25-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Excel Formula to seperate date by a "." delimeter

    Quote Originally Posted by Roel Jongman View Post
    sorry, I missed a semi colon as formula separator.. should have used a converter

    try this one..

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Ok, we are getting closer...this only works correctly if there is a 3 digit value in the 3rd octet. if there is a single digit or double digit value, it returns incorrect information.

    For example if the IP Address is 192.168.99.100. I need it to return just 99

    or if its 192.168.1.100. I need it to return 1

  6. #6
    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: Excel Formula to seperate date by a "." delimeter

    Enter in M2 and drag formula across to cell O2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v L M N O
    1 IP ADDRESS 1ST OCTET 2ND OCTET 3RD OCTET
    2 192.168.100.212 192 168 100.212
    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

  7. #7
    Registered User
    Join Date
    01-25-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Excel Formula to seperate date by a "." delimeter

    Quote Originally Posted by AlKey View Post
    Enter in M2 and drag formula across to cell O2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v L M N O
    1 IP ADDRESS 1ST OCTET 2ND OCTET 3RD OCTET
    2 192.168.100.212 192 168 100.212
    OK, we are close....I only need to return the value in the 3rd octet which in this example is 100. Not 100.212

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Excel Formula to seperate date by a "." delimeter

    Why not just use text to columns with dot as the delimiter?
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    01-25-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Excel Formula to seperate date by a "." delimeter

    Quote Originally Posted by shg View Post
    Why not just use text to columns with dot as the delimiter?
    Because I need the sheet to be dynamic as its providing data to other sheets pulling information...

  10. #10
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Excel Formula to seperate date by a "." delimeter

    at M2
    =MID(SUBSTITUTE($L2,".",REPT(" ",LEN($L2))),(COLUMN(A1)-1)*LEN($L2)+1,LEN($L2))
    copy to right

  11. #11
    Registered User
    Join Date
    01-25-2019
    Location
    Florida
    MS-Off Ver
    Office 365
    Posts
    14

    Thumbs up Re: Excel Formula to seperate date by a "." delimeter

    Quote Originally Posted by Ghozi Alkatiri View Post
    at M2
    =MID(SUBSTITUTE($L2,".",REPT(" ",LEN($L2))),(COLUMN(A1)-1)*LEN($L2)+1,LEN($L2))
    copy to right
    BOOOOM!!!!! Works great!!!! Thank you very much and thanks to everyone that contributed! HUGE time saver and error reducer!!!!!!!!!!!!!!!

  12. #12
    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: Excel Formula to seperate date by a "." delimeter

    I guess I misread the requirement. The cell O2 was marked yellow which I mistook for desired result.
    Please accept my apology.
    Try this formula
    Enter in M2 and drag formula across
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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] Date in Excel ("30/09/2016") copies incorrectly into Access ("30/05/1905")
    By lukelucky in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-30-2017, 05:19 AM
  2. [SOLVED] Index match if "date" is between 2 dates in 2 seperate columns.
    By Benjiboi_87 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 04-28-2016, 02:01 AM
  3. Replies: 1
    Last Post: 01-22-2016, 09:21 AM
  4. Replies: 0
    Last Post: 01-09-2013, 06:52 PM
  5. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  6. Replies: 3
    Last Post: 08-28-2010, 09:31 AM
  7. Replies: 3
    Last Post: 06-29-2007, 07:05 AM

Tags for this Thread

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