Image Name???? how to automatically identify image name and place in cell next to image.

shawninutah

New Member
Joined
Jan 22, 2014
Messages
4
I am looking for a way to take the picture name associated with an image ie: (picture 571) and place that picture name in the cell next to the image.

I can see the picture name - it registers in the top left box that usually indicates the cell the cursor is on... and I could manually type that name next to each image.
However my spreadsheet has several thousand rows- each with several columns of information and an image..

I am looking for a way "formula?" to automatically read the image in cell J4 and populate cell K4 with the image name... and so on.

The reason for my request... is I am importing products into a web based shopping cart... to do so I have to export the products to a csv and import that csv into the shopping cart.
the process of exporting to a csv- strips away all the images and leaves just data.

I found that I can save the document as an html and that process creates a folder with all the images- saved as (picture 571.jpg)
if the resulting csv had the image name... the shopping cart would then look for that image name in my image file and it would populate into the shopping cart appropriately.

This seemed on it's face like a really simple thing to do, I have plenty experience with excel & I thought I'd be able to make cell k4= j4 and tada it would glean the image name & I could simply copy that formula all the way down the sheet & it would be done... but I just cant find the magic button that freely gives up the image name...
*I have no experience with vba. and very little experience with macros.


any advice would be appreciated.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I don't know much about shapes and pictures, but perhaps you could try something like this:

Code:
Sub FindShapes()


Dim shp As Shape
Dim shpRow As Long
Dim shpColumn As Long


'    NewShapeName = InputBox("What Name do you want to call it?", "New Name")


For Each shp In ActiveSheet.Shapes  ' or in Worksheets("Sheet1").Shapes
            
    shp.Select
    MsgBox shp.Name


    shpRow = ActiveSheet.Shapes(shp.Name).BottomRightCell.Row
    shpColumn = ActiveSheet.Shapes(shp.Name).BottomRightCell.Column


    MsgBox shpRow
    MsgBox shpColumn
    
    Cells(shpRow, shpColumn + 1) = shp.Name


Next shp


End Sub

I have included a lot of msgboxes so that you can see the information. Be sure to first make a copy of your workbook so as not to lose any data.
 
Upvote 0
it looks like this solution would require manual input of name for each image... ? is that correct... if so I already have that ability... I'm looking for an automatic way to pull the image name from each image and post it to the cell next to the image.
 
Upvote 0
Have you tried the code? I just included the input box option, in case you need to rename each shape. But in my code this is disabled (because I have the " ' " before the inputo box option). So, I think the code will do what you want. Try it and let me know. Only don't forget to make a copy of your workbook first.
 
Upvote 0

Forum statistics

Threads
1,223,244
Messages
6,170,976
Members
452,372
Latest member
Natalie18

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top