+ Reply to Thread
Results 1 to 4 of 4

Count records to modify file path

  1. #1
    Registered User
    Join Date
    07-22-2013
    Location
    Kendall, NY
    MS-Off Ver
    Excel 2013
    Posts
    4

    Count records to modify file path

    I have a spreadsheet with a list of inventory. One of the columns has a file path for the picture of the particular item. Some items have multiple images and I have to change the file path slightly. The inventory is MTG cards. So what I have so far is:

    Column B is the name of the card. It is also the file name of the card image. In the case of multiple images it would be, "cardname"1, "cardname"2 and so on.
    Column C is the edition the card is from. It is also the subfolder the card images are in.
    Column AN holds the image path.

    The formula I'm using now is:
    ="C:\Program Files (x86)\Gatherer Extractor\pics\"&C2&"\"&B2&".full.jpg"

    What I need is: When there are duplicate values in both column B and C, meaning same card from the same set with alternate pictures, I need excel to count them and put the corresponding number at the end of the file name. For example, one card is named Basal Thrull. There are 5 cards with that name. 4 of them are from the same set and have alternate images. So, excel needs to see the repeated name AND edition code, count the order each one is in and add it to the file name. So the first Basal Thrull out the 5 of them will return a file path of:

    C:\Program Files (x86)\Gatherer Extractor\pics\FE\Basal Thrull1.full.jpg ("1" at end of file name)

    The next will return:

    C:\Program Files (x86)\Gatherer Extractor\pics\FE\Basal Thrull2.full.jpg ("2" at end of file name

    And so on, untill the 5th one. The 5th one is from a different edition so that one should return to default:

    C:\Program Files (x86)\Gatherer Extractor\pics\ME\Basal Thrull.full.jpg (no number in file name, different subfolder)

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Count records to modify file path

    what makes #5 different?
    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    07-22-2013
    Location
    Kendall, NY
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Count records to modify file path

    I explained why #5 is different. It's from a different edition and therefore a different card.

    Can't attack file, it's too big.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Count records to modify file path

    Oh I see "me" not "fe" didnt say your whole workbooks just a few examples with desired results read post#2
    Last edited by martindwilson; 07-23-2013 at 08:02 PM.

+ 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. Specified folder path to select file path
    By JayEmTee91 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2012, 10:38 AM
  2. How can I modify the path of existing linked picture?
    By Logique in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2011, 06:56 AM
  3. Replies: 7
    Last Post: 10-09-2009, 10:10 AM
  4. Use String Variables in File Path and create path if not existing
    By JanBang in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2007, 09:04 AM
  5. [SOLVED] draw 999 x 8 random records from file with 8614 records
    By news.wanadoo.nl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2006, 11:10 AM

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