+ Reply to Thread
Results 1 to 3 of 3

Referencing a specific character in a cell

  1. #1
    Registered User
    Join Date
    09-22-2006
    Location
    Western Arkansas
    MS-Off Ver
    2016
    Posts
    75

    Referencing a specific character in a cell

    I have a spreadsheet full of products, each with a unique part number. I use this as my database for an online shopping cart. I have a directory on my web with images of each part. The image name is [part number].jpg. I have about 8000 and I want to divide them into subdirectories based on the first character of the part number, so a part number that begins with 7 would be placed into a directory named ../images/parts/7/. I'm currently using a formula in the spreadsheet ([="../images/parts/"&B4&".jpg], with the part number residing in cell B4) to insert the part number from a separate cell to create my file path. How would I re-write this formula to insert the first character into "7" subdirectory of the above path? Also, in a separate directory for my thumbnail images, I have the word "thumb" in front of the part number to reflect a thumbnail part number. Based on the same scenario above, how would I write the formula to reflect the first character following the word "thumb"? Thanks.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    ([="../images/parts/"&left(B4,1)&".jpg],

    and

    ([="../images/parts/"&mid(B4,,6,1)&".jpg],

    assuming no space after the "thumb"
    Martin

  3. #3
    Registered User
    Join Date
    09-22-2006
    Location
    Western Arkansas
    MS-Off Ver
    2016
    Posts
    75
    That worked. Thanks!

+ 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