+ Reply to Thread
Results 1 to 4 of 4

Insert Picture In Cell By Matching Employee ID

Hybrid View

NeedForExcel Insert Picture In Cell By... 09-03-2015, 02:32 AM
shukla.ankur281190 Re: Insert Picture In Cell By... 09-03-2015, 02:33 AM
NeedForExcel Re: Insert Picture In Cell By... 09-03-2015, 02:45 AM
NeedForExcel Re: Insert Picture In Cell By... 09-03-2015, 03:23 AM
  1. #1
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Insert Picture In Cell By Matching Employee ID

    Hi,

    I have a Folder that has a few .JPG Images, and each JPG imgae has the Employee ID as name (For Example 12.jpg)

    On my worksheet On Cell A1, I will input the employee ID, and I want the Image to be inserted in that cell and Also autofit to match the Cell.

    Any idea how that can be done?
    Cheers!
    Deep Dave

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: Insert Picture In Cell By Matching Employee ID

    Have a look this video of Mr.Excel & Mr.Mike
    https://www.youtube.com/watch?v=MzF_5DXhqbs
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Insert Picture In Cell By Matching Employee ID

    I cant open YouTube here at Work.

    But I think I know which Video that is.. Its the 1 where you manually paste all the Pictures in a Cell and use them as Named Ranges right? That isn't the solution for my problem then..

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Insert Picture In Cell By Matching Employee ID

    If anyone needs help with the same issue -

    Sub InsertPics()
            
        On Error Resume Next
            
        Dim Cell As Range, EmpID As String
        Const Path As String = "E:\Deep Dave\Excel Sheets\Survey\Photographs\"
        
        Application.ScreenUpdating = False
        
        For Each Cell In Range("Rng")
        
            If Len(Cell.Value) = 4 Then
                Cell.Select
                EmpID = Cell.Value + 0
                ActiveSheet.Pictures.Insert(Path & EmpID & ".jpg").Select
                With Selection
                    .Placement = xlMoveAndSize
                    .ShapeRange.LockAspectRatio = msoFalse
                    .ShapeRange.Height = ActiveCell.Height
                    .ShapeRange.Width = ActiveCell.Width
                    .ShapeRange.Name = Cell.Value
                End With
            End If
            
        Next Cell
    
        Application.ScreenUpdating = True
        
    End Sub
    Last edited by NeedForExcel; 09-03-2015 at 05:53 AM.

+ 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. Matching two employee directories, and adding the Employee #
    By sevanseriesta in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-26-2015, 01:58 PM
  2. [SOLVED] Insert Picture in cell, click commanbutton to rename picture, lock cell and remove button
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2014, 10:05 PM
  3. Insert Picture To Cell in Col A with pic name in Col B
    By EBTI in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-07-2014, 07:57 AM
  4. How to insert a picture into a cell
    By VickiFletcher in forum Excel General
    Replies: 3
    Last Post: 04-28-2014, 10:29 AM
  5. VBA for Picture insert at particular worksheet range. Picture name derived from cell.
    By Douglas2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2013, 01:16 AM
  6. Insert picture when cell changes
    By Rookie_User in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-22-2006, 03:45 AM
  7. [SOLVED] how can I insert a picture in a cell
    By yakmelk in forum Excel General
    Replies: 2
    Last Post: 11-03-2005, 04:25 PM

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