+ Reply to Thread
Results 1 to 12 of 12

Multiple Pictures In A Price List

  1. #1
    Registered User
    Join Date
    10-06-2008
    Location
    australia perth
    Posts
    5

    Multiple Pictures In A Price List

    Hi, I've got a price list with 2500 different lines which the boss has decided need a picture against each one (the guys a legend!!). Can anyone help me with a macro that will look up the code in Column A, then add .jpg on the end, and insert a picture into Column J?? The concept of inserting 2500 different pictures is way to scary !!..

    Thanks Heaps
    Last edited by Craig_Abode; 10-09-2008 at 10:03 AM.

  2. #2
    Forum Contributor
    Join Date
    06-03-2008
    Posts
    387
    I've never imported pictures before, but this should get you started. You might need to write some other coding to resize the pictures.

    Here's the link where I found the InsertPictures function:
    http://www.exceltip.com/st/Insert_pi...Excel/486.html

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    Hi
    the macro in attached file inserts and resizes pictures. keep pics in the same folder as this file and run the macro
    ravi
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Craig_Adobe,

    Welcome to the Forum!

    Here is another version. The macro starts at cell "A2" and finds the last row automatically.Since you didn't mention what size you want the pictures, the pictures are inserted full sized. You will need to determine the pictures dimensions for your spreadsheet at some point or the pictures will be a big jumble. This also means the row height should be set to the max height allowed for a picture.

    You can change the starting cell, the picture column, and the picture extension in the macro. They are marked in red.
    Please Login or Register  to view this content.
    Adding the Macro
    1. Copy the macro above pressing the keys CTRL+C
    2. Open your workbook
    3. Press the keys ALT+F11 to open the Visual Basic Editor
    4. Press the keys ALT+I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Paste the code by pressing the keys CTRL+V
    7. Make any custom changes to the macro if needed at this time.
    8. Save the Macro by pressing the keys CTRL+S
    9. Press the keys ALT+Q to exit the Editor, and return to Excel.

    To Run the Macro...
    To run the macro from Excel, open the workbook, and press ALT+F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.

    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    10-06-2008
    Location
    australia perth
    Posts
    5

    Interesting questions...

    Thanks for your help everyone...your great help has now raised extra questions - is it possible to get the macro to resize the photo (height but not width) to suit the cell size so that it is framed nicely by the border?? The width of the photo should maintain the original proportions of the photo so that everything looks sweet ??? I'm probably asking too much.

    I've attached a copy of page one of my project so that you get a better feel for what we are trying to achieve.

    Once again thanks for your help.
    Attached Files Attached Files

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Craig_Adobe,

    Could you post an Excel 2003 version as well?

    Sincerely,
    Leith Ross

  7. #7
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    This worked for me a few years ago
    http://www.excelforum.com/excel-misc...n-sorting.html

    Regards

    Dav

  8. #8
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764
    Hi
    The macro in attached file picks pictures named in col C (15 to 23 or last row) and pastes them in col H.
    Ravi
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-06-2008
    Location
    australia perth
    Posts
    5
    Hi attached is the older version...

    Regards,
    Craig
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-06-2008
    Location
    australia perth
    Posts
    5
    Hi Ravishankar, Thanks for your file that was great. Is it possible to get the picture to fit the cell size rather than re-size all of the row heights as a part of the macro? This would allow us to have some cells larger than others to highlight some products [new ones those on special etc.]. Also [sorry to sound so needy] is it possible for the macro to insert one consistent photo (named Abodelogo.jpg) when a photo of the code doesn't exist?

    Thanks for your help

    Regards,
    Craig

  11. #11
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764
    Hi
    Give this a try
    Ravi
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-06-2008
    Location
    australia perth
    Posts
    5
    Thanks Ravi - you are a LEGEND !!

+ 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. Create a dynamic list from multiple sheets
    By shbiskup in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-28-2022, 04:04 AM
  2. Mark up price list
    By bethvan in forum Excel General
    Replies: 3
    Last Post: 04-15-2008, 04:51 PM
  3. Filter basic price list
    By JC1754 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2008, 11:29 AM
  4. columns to repeat info for price list
    By jp95 in forum Excel General
    Replies: 1
    Last Post: 12-09-2007, 06:36 PM
  5. copying various cells in ot different cells in a different sheet
    By MonkeyDeath in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-25-2007, 11:22 AM

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