+ Reply to Thread
Results 1 to 9 of 9

Formula needed to lookup # and then copy and paste picture

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    NY Metro
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Formula needed to lookup # and then copy and paste picture

    Hi all,

    I'm new here and hope not to be too redundant but even a teacher couldn't help me. First part seems so simple but second part is way beyond me.

    I have three tabs in one excel file attached here too. First the work sheet I am looking to populate with pictures in two separate cells, and the second two tabs are database files for retrieving those pictures.

    Quest 1) I want to search for a style code taken from cell C13 of first page, search for it in the first column on the second sheet data table, and then copy and paste a picture from the corresponding cell in the same row(column F) of the lookedup style code and copy and paste it into cell A9 on that first work sheet. Vlookup doesn't copy and paste a picture that's been originally placed in a cell. I need perhaps a macro executed within vlookup that will copy and paste that cell onto my first sheet when the style # has been found or use a different function that works with other than with alphanumeric info actually within the cell.

    Quest 2) needs to accomplish the same feat, however if you look at the third tab, a lookup first has to find the correct code in each of the four preceding cells(identified in the first sheet in cells B7:E7) prior to the picture being copy and pasted. I.e. four columns worth of lookup needs to occur and as an exact match. Every row in the third sheet data table will have a unique combination of those four preceding cells. Every picture in the fifth column will be unique to the four corresponding codes or fields of the preceding four cells of the data table.

    Thanks in advance for any help that can be offered. It is certainly appreciated.
    Steve
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Formula needed to lookup # and then copy and paste picture

    Hello
    I answered a similar question a few days ago about adding images dynamically to cells based upon a selection. I've applied similar ideas to your example file.

    There a a few new named ranges created for ease of reference but specifically note the 3 which work the image selection: CombiCode; Fabric_Image and IllustrationImage. Because you need to match 4 criteria for your Illustration image, rather than use a complex array formula, I've created an extra field 'CombiCode', on the 'Base Block Figure DB' tab. The image selection works from the dropdowns in cells B7:E7 and C8 on the 'Individual Order Work TKT' sheet.

    You may have to experiment with image size and placement to get things to look as you wish. Below is a link to a video explaining how it's done.

    http://www.youtube.com/watch?v=0sA6J1lTDfg

    Hope this helps.
    DBY
    Attached Files Attached Files

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Formula needed to lookup # and then copy and paste picture

    Hello dress4success,

    Hope you find the attached WorkBook helpful.


    Also see the "Please consider" note at the bottom of this Post

    I shall in the meantime see what DBY has done for you! LOL,
    maybe it is better than what I have tried!
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Registered User
    Join Date
    06-22-2012
    Location
    NY Metro
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Formula needed to lookup # and then copy and paste picture

    Quote Originally Posted by Winon View Post
    Hello dress4success,

    Hope you find the attached WorkBook helpful.


    Also see the "Please consider" note at the bottom of this Post

    I shall in the meantime see what DBY has done for you! LOL,
    maybe it is better than what I have tried!
    Wow guys. Thanks DBY & Winon. I am looking forward to trying them both a little later today when I get back to my computer. Sorry DBY for not seeing your previous answer, I did spend a bit of time searching before posting my question. Thanks again. More later!
    Steve

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Formula needed to lookup # and then copy and paste picture

    Hello dress4success,

    Personally I think that what DBY came up with might be a better approach!

    I only noticed that the original Workbook contains Named Ranges, after I had a look at what DBY had done for you.

    The attached WorkBook has all my VBA Code removed, and "replaced" with Named Ranges, just as DBY did. There is very little difference between DBY's & my approach, except for the way in which we created an additional "Reference Code" to bring it all together.

    Now you may have your pick! Don't you think this Forum rocks!?

    @ DBY

    Great work DBY!
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Formula needed to lookup # and then copy and paste picture

    Thanks Winon
    But I can't really take all that much credit, I learnt it from the YouTube video that I provided a link to. I think your VBA approach was very clever too. That's the thing with Excel, there are often so many ways to go. It's just about personal preference. I hope dress4success finds either way useful and can make it all work.

    Regards
    DBY

  7. #7
    Registered User
    Join Date
    06-22-2012
    Location
    NY Metro
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Formula needed to lookup # and then copy and paste picture

    Hey Guys,

    Again want to thank you both for your help and input. Yes Winon this form does ROCK as I'm sure it is invaluable to thousands more like it just was to myself.

    I just had a chance to open and review both and DBY's solution will work best in my case for the following reason: Although DBY created a drop down for the 4 different codes in row 7, those 4 codes in addition to the fabric code will actually be imported directly into those cells from our website when orders are transmitted. I can not have a formula in any of the 4 variation code cells. DBY's solution will enable me to use the same solution once those cells are automatically populated and will create my detailed work ticket for the job order with pictures included.

    Now I just have to familiarize myself with all the formulas to understand exactly whats going on to do it myself in other instances.

    DBY, thank you for sharing the video link and his web address,as it will be very helpful for step by step explanation with this issue and for many other questions I may come across.


    I will leave it unsolved temporarily until I can implement it myself at work tomorrow in case I have any remaining questions.

    Awesome help.Thanks again.

    Stephen

  8. #8
    Registered User
    Join Date
    06-22-2012
    Location
    NY Metro
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Formula needed to lookup # and then copy and paste picture

    DBY & Winon,

    I again would like to thank you both. I was able to apply DBY's suggested method not using the drop down cells but eventually auto population and it works like a charm. I'm sure I will be back but this problem is solved. Be well and much success to you guys.

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Formula needed to lookup # and then copy and paste picture

    You are most welcome !

    At least, we have tried. Thank you for acknowledging that.

    May you enjoy absolute satisfaction with your final result.

+ 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