Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8823233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:18:06+00:00 2026-06-14T06:18:06+00:00

I have an excel document with over 300 records. In the first row for

  • 0

I have an excel document with over 300 records.

In the first row for each record, there is a User Image variable.
This record will always be username.jpg or empty.

I have a folder with the corresponding images, all named in the exact same fashion.

Is there any way to replace the text in the first row with their related images automatically?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:18:08+00:00Added an answer on June 14, 2026 at 6:18 am

    If your User image variable is in column A, then this code will insert the picture into column A and adjust the height of the row to the height of the picture. You will probably have to tweak the code slightly.

    Sub insertPic()
    
    Dim pic As String
    Dim url As String
    Dim r As Integer
    Dim he As Integer
    
    
    
    url = "C:\User\Pictures\" ' This is the variable to the folder
    
    For r = 1 To 300
    pic = Sheets("Sheet1").Range("A" & r).Value ' This is your username file
    pic = url & pic
    
    
    
    With ActiveSheet.Pictures.Insert(pic) ' Insert picture into active sheet
        .Left = ActiveSheet.Range("A" & r).Left ' left and top align the left and top of the picture with the specified cell
        .Top = ActiveSheet.Range("A" & r).Top
        he = .Height ' get height of image
    
    
    End With
    Sheets("Sheet1").Range("A" & r).Select
        Selection.RowHeight = he ' match row height to picture height
    Next r
    
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How would insert a row into an excel document. This is what I have.
I'm hoping that I can explain this well enough. I have an excel document
I have an excel document with multiple sheets. Each sheet contains data of separate
I've have an page where the user uploads an Excel document. The document contain
I have an Excel document that contains over 1000 sheets of contact information of
Hey, I have an excel document with columns A and B. Row A has
I have a master excel document with more than 300 worksheets inside. I want
I have read an excel document using apache-poi. The excel document which have records
I have created an Excel document using OpenXml SDK 2.0, now I have to
I need to write a macro to clean up an Excel document. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.