+ Reply to Thread
Results 1 to 3 of 3

Extract and rename cells

  1. #1
    Registered User
    Join Date
    07-10-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Smile Extract and rename cells

    Hello all,
    Yes....I'm a newbie to the forum. Many thanks to the many folks who donate time and resources to make this forum available to all.

    Picture Rename Formula Quest.xlsx
    Attached is a sample of what I need.

    I have thousands of pictures to rename. Most are coded as shown in the attached file as ###E_ or ###F_ followed by a number with a .jpg file extension.

    I want to drop the first group of numbers (always 5 places to the left) in the original file name and rename the cell according to the name placed in column B (Desired Name) using the number of the picture embedded in the original file name (five places from the left).

    My problem is that the numbers are not in order and sometimes are in the 1000's, (4 spaces). The column is in general format.

    I want to extract the number beginning in the sixth position and use it in the beginning of the new file name. Adding the ".jpg" is the easy part.

    I'm convinced it's possible and I've played around with it long enough; so I'm putting it to the forum. Any recommendations are welcomed and appreciated. I suspect the answer and final formula is probably easier then I thought it would be.

    Thanks all for your time and patience.

    Bill - bdavis407

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Extract and rename cells

    Try this formula in D2... then copy to the rest...

    =VALUE(MID(A2,SEARCH("_",A2)+1,SEARCH(".",A2)-SEARCH("_",A2)-1))&" "&B2&".jpg"

    PS Thank you for such a clear question and example... if only your example is explained by others...

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Extract and rename cells

    How about this:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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