+ Reply to Thread
Results 1 to 5 of 5

Character Count Until a Number is Reached

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Character Count Until a Number is Reached

    I have a spreadsheet containing thousands of rows, each row shows a file path in the format /Root Folder Name/Nested Folder Name/File Name, however both the root folders and nested folders contain different numbers of charchters throughout. The one common element is that the nested folder always starts with a number, so for example:

    /Jo Blogs and Sons/4. Annual Accounts/Fiscal Summary.xls

    What I want to be able to do is to write a formula to remove the root folder name and just leave the nested folder and the file name, so I want to end up with

    4. Annual Accounts/Fiscal Summary.xls

    I therefore need a way of counting the number of characters before the number in each row, so I can then add this to a MID function, but I've no idea how to do this?

    Can anyone suggest an easy way?

    Many thanks

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Character Count Until a Number is Reached

    Perhaps =MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&{0,1,2,3,4,5,6,7,8,9}))

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Character Count Until a Number is Reached

    Assume your data in A14, then

    =RIGHT(A14,LEN(A14)-FIND("/",A14,2))

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Character Count Until a Number is Reached

    Hi Pep Le Mokko and alansidman

    Both solutions worked perfectly...

    Many thanks for your help...

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Character Count Until a Number is Reached

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


    [EDIT]

    =RIGHT(A1,LEN(A1)-FIND("/",A1,2)) will only work in some cases, try it with this
    "Test/Jo Blogs and Sons/4. Annual Accounts/Fiscal Summary.xls"
    Last edited by Marcol; 12-07-2012 at 09:55 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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