Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 112
Default importing thousands of .jpg images to excel

I have an excel spreadsheet with all the data I need except the images. The
images are in another location saved in my computer (about 15,000). The SKU
#s are in column A on the spreadsheet. The images are all named with the
same SKU #s. How do I import the images into the spreadsheet so they match
up correctly?

--
Andrea
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default importing thousands of .jpg images to excel

This example assumes that the names are in column A, example, andrea
The filename would be andrea.jpg and the files are located in C:\test

Sub Macro1()
Dim n As Long
Dim v As String
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To n
v = "C:\test\" & Cells(i, 1).Value & ".jpg"
ActiveSheet.Pictures.Insert (v)
Next
End Sub

--
Gary''s Student - gsnu200826


"Andrea" wrote:

I have an excel spreadsheet with all the data I need except the images. The
images are in another location saved in my computer (about 15,000). The SKU
#s are in column A on the spreadsheet. The images are all named with the
same SKU #s. How do I import the images into the spreadsheet so they match
up correctly?

--
Andrea

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 112
Default importing thousands of .jpg images to excel

Thanks! Is there an easier way to explain this? I am only familiar with
excel basics and this pretty much lost me. Where do I place this formula?
--
Andrea


"Gary''s Student" wrote:

This example assumes that the names are in column A, example, andrea
The filename would be andrea.jpg and the files are located in C:\test

Sub Macro1()
Dim n As Long
Dim v As String
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To n
v = "C:\test\" & Cells(i, 1).Value & ".jpg"
ActiveSheet.Pictures.Insert (v)
Next
End Sub

--
Gary''s Student - gsnu200826


"Andrea" wrote:

I have an excel spreadsheet with all the data I need except the images. The
images are in another location saved in my computer (about 15,000). The SKU
#s are in column A on the spreadsheet. The images are all named with the
same SKU #s. How do I import the images into the spreadsheet so they match
up correctly?

--
Andrea

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default importing thousands of .jpg images to excel

It is not a formula, it is a VBA macro

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Tue, 13 Jan 2009 14:53:02 -0800, Andrea
wrote:

Thanks! Is there an easier way to explain this? I am only familiar with
excel basics and this pretty much lost me. Where do I place this formula?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing images to scale Peter[_4_] Excel Discussion (Misc queries) 0 July 24th 08 07:18 PM
Display Data in Thousands in Excel 2007 Django Excel Discussion (Misc queries) 3 June 16th 08 07:21 PM
Rounding to thousands in excel [email protected] Excel Discussion (Misc queries) 4 September 28th 07 05:55 AM
Getting rid of thousands of rows Excel 2002 Northern Lights Excel Discussion (Misc queries) 3 June 15th 07 06:41 PM
On Excel I need to round up in tens of thousands SorianoP Excel Discussion (Misc queries) 3 September 28th 06 06:51 PM


All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"