+ Reply to Thread
Results 1 to 5 of 5

Finding number between two characters in cell.

Hybrid View

paularthur90 Finding number between two... 07-30-2015, 09:32 AM
quekbc Re: Finding number between... 07-30-2015, 09:35 AM
zbor Re: Finding number between... 07-30-2015, 09:38 AM
MarvinP Re: Finding number between... 07-30-2015, 09:47 AM
paularthur90 Re: Finding number between... 07-30-2015, 10:09 AM
  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    26

    Thumbs up Finding number between two characters in cell.

    Hi,

    I am trying to find the number (could be 3 or 4 numbers long) after the 2nd '#' and before the 3rd '#'.

    0000434269#In#1253###20150622#075650.wav

    The number I want is 1253.

    Thanks,
    Paul
    Last edited by paularthur90; 07-30-2015 at 10:10 AM.

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Finding number between two characters in cell.

    Try this...

    Formula: copy to clipboard
    =MID(H7,FIND("@",SUBSTITUTE(H7,"#","@",2))+1,FIND("@",SUBSTITUTE(H7,"#","@",3))-FIND("@",SUBSTITUTE(H7,"#","@",2))-1)

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Finding number between two characters in cell.

    This will return you text 1234 (not number but text):

    Formula: copy to clipboard
    TRIM(LEFT(SUBSTITUTE(MID(SUBSTITUTE(A1,"#",REPT(" ",255),2),255,255),"#",REPT(" ",255)),255))


    If you want number you need to multiply this result by 1*formula but this will return you erro in case there si something else than number.
    For example: 0000434269#In#12C3###20150622#075650.wav will cause error while previous wont so I didn't multiply it.
    Never use Merged Cells in Excel

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,355

    Re: Finding number between two characters in cell.

    Hi Paul,

    Try this one

    =TRIM(MID(SUBSTITUTE(A1,"#",REPT(" ",LEN(A1))),LEN(A1)*2,LEN(A1)))

    See the attached.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    10-16-2014
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    26

    Re: Finding number between two characters in cell.

    Thank you everyone for all your help.

    Got it all sorted

+ 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] help with finding characters in a cell
    By RobertM01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-25-2014, 03:38 AM
  2. New line in cell after certain number of characters, or where a number stands
    By barqujo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2013, 01:14 PM
  3. Replies: 1
    Last Post: 11-04-2012, 07:51 AM
  4. Finding repeating multiple characters from a string in cell
    By varg111 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-16-2012, 08:15 AM
  5. Finding characters in a cell
    By therealjag in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2009, 04:20 AM
  6. finding characters after a letter in cell
    By tinkerbelle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-05-2007, 11:36 AM
  7. Finding cells with a specific number of characters
    By Kamran in forum Excel General
    Replies: 6
    Last Post: 03-29-2006, 06:10 PM
  8. Finding entries over a certain number of characters
    By Brian in forum Excel General
    Replies: 2
    Last Post: 03-10-2006, 01:10 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