Home

Convert image url to actual image in excel

%3CLINGO-SUB%20id%3D%22lingo-sub-309020%22%20slang%3D%22en-US%22%3EConvert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309020%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20column%20of%20image%20URLs%20in%20my%20workbook%20and%20would%20like%20to%20show%20the%20actual%20image%20in%20the%20next%20column.%20Is%20there%20a%20formula%20or%20add%20in%20that%20can%20be%20used%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-309020%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-413220%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-413220%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20have%20a%20file%20having%20one%20column%20consist%20of%20many%20URLs%20and%20in%20next%20column%20I%20wish%20to%20convert%20these%20URLs%20into%20real%20images.%20I%20am%20using%20office%202007.%20Please%20find%20the%20file%20as%20attached.%20Kindly%20help%20me%20to%20convert%20this%20file%20.%20Looking%20forward.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-310074%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-310074%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20update%20the%20code%20like%20the%20following%20by%20adding%20this%20line%20to%20it%3A%3C%2FP%3E%3CPRE%3EPshp.Placement%20%3D%20xlMoveAndSize%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3ESub%20URLPictureInsert()%3CBR%20%2F%3E'Updateby%20Extendoffice%2020161116%3CBR%20%2F%3E'Update%20%231%20by%20Haytham%20Amairah%20in%2020180104%3CBR%20%2F%3E'Update%20%232%20by%20Haytham%20Amairah%20in%2020180108%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20Pshp%20As%20Shape%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20xRg%20As%20Range%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20xCol%20As%20Long%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20On%20Error%20Resume%20Next%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Application.ScreenUpdating%20%3D%20False%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20Rng%20%3D%20ActiveSheet.Range(%22A2%3AA140%22)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20For%20Each%20cell%20In%20Rng%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20filenam%20%3D%20cell%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ActiveSheet.Pictures.Insert(filenam).Select%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20Pshp%20%3D%20Selection.ShapeRange.Item(1)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Pshp.Placement%20%3D%20xlMoveAndSize%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20If%20Pshp%20Is%20Nothing%20Then%20GoTo%20lab%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20xCol%20%3D%20cell.Column%20%2B%201%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20xRg%20%3D%20Cells(cell.Row%2C%20xCol)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20With%20Pshp%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.LockAspectRatio%20%3D%20msoFalse%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.Width%20%3D%2060%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.Height%20%3D%2030%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.Top%20%3D%20xRg.Top%20%2B%20(xRg.Height%20-%20.Height)%20%2F%202%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.Left%20%3D%20xRg.Left%20%2B%20(xRg.Width%20-%20.Width)%20%2F%202%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20End%20With%3CBR%20%2F%3Elab%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20Pshp%20%3D%20Nothing%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Range(%22A2%22).Select%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Next%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Application.ScreenUpdating%20%3D%20True%3CBR%20%2F%3EEnd%20Sub%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20will%20change%20the%20property%20for%20each%20image%20after%20inserting%20it%20to%20make%20it%20move%20and%20size%20with%20the%20cell.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309933%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309933%22%20slang%3D%22en-US%22%3E%3CP%3EI%20finally%20got%20it%20to%20work.%20I%20hadn't%20changed%20the%20insert%20cell%20location%2C%20just%20the%20url%20cell%20range.%3C%2FP%3E%3CP%3ENow%20I'm%20trying%20to%20figure%20out%20how%20to%20get%20the%20pics%20to%20scale%20with%20changing%20cell%20size.%20I've%20tried%20the%20following%20code%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fwww.extendoffice.com%2Fdocuments%2Fexcel%2F4923-excel-picture-move-and-size-with-cells-default.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHERE%20%3C%2FA%3E%26nbsp%3Bwith%20no%20luck%20yet.%20Working%20with%20VBA%20is%20completely%20new%20to%20me.%20I%20appreciate%20your%20help%20and%20patience.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22line%20number1%20index0%20alt2%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309904%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309904%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20used%20the%20same%20code%20as%20in%20the%20link%20I%20mentioned%26nbsp%3Bbefore.%3C%2FP%3E%3CPRE%3ESub%20URLPictureInsert()%3CBR%20%2F%3E'Updateby%20Extendoffice%2020161116%3CBR%20%2F%3E'Update%20by%20Haytham%2020180104%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20Pshp%20As%20Shape%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20xRg%20As%20Range%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20xCol%20As%20Long%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20On%20Error%20Resume%20Next%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Application.ScreenUpdating%20%3D%20False%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20Rng%20%3D%20ActiveSheet.Range(%22A2%3AA140%22)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20For%20Each%20cell%20In%20Rng%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20filenam%20%3D%20cell%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ActiveSheet.Pictures.Insert(filenam).Select%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20Pshp%20%3D%20Selection.ShapeRange.Item(1)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20If%20Pshp%20Is%20Nothing%20Then%20GoTo%20lab%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20xCol%20%3D%20cell.Column%20%2B%201%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20xRg%20%3D%20Cells(cell.Row%2C%20xCol)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20With%20Pshp%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.LockAspectRatio%20%3D%20msoFalse%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.Width%20%3D%2060%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20.Height%20%3D%2030%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.Top%20%3D%20xRg.Top%20%2B%20(xRg.Height%20-%20.Height)%20%2F%202%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.Left%20%3D%20xRg.Left%20%2B%20(xRg.Width%20-%20.Width)%20%2F%202%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20End%20With%3CBR%20%2F%3Elab%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20Pshp%20%3D%20Nothing%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Range(%22A2%22).Select%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Next%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Application.ScreenUpdating%20%3D%20True%3CBR%20%2F%3EEnd%20Sub%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I%20adjusted%20the%20Height%20and%20Width%20to%20make%20the%20images%20fit%20the%20cells.%3C%2FP%3E%3CP%3EPlease%20note%20that%20the%20code%20may%20take%20up%20to%205%20minutes%20to%20finish%20the%20process.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309891%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309891%22%20slang%3D%22en-US%22%3E%3CP%3EThat's%20EXACTLY%20what%20I'm%20looking%20for.%20But%2C%20When%20I%20run%20the%20code%2C%20the%20images%20are%20not%20placed%20inside%20cells.%20Would%20you%20please%20share%20with%20me%20the%20actual%20code%20you%20ran%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309845%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309845%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Michael%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20code%20is%20already%20programmed%20to%20place%20the%20image%20next%20to%20the%20link%20in%20the%20adjacent%20cell.%3C%2FP%3E%3CP%3EThis%20is%20the%20result%20that%20I%20got%20when%20I%20run%20the%20code.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F64836i42418B0F708BFA48%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-01-07_19-46-17.png%22%20title%3D%222019-01-07_19-46-17.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIsn't%20that%20what%20you%20asking%20for%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309801%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309801%22%20slang%3D%22en-US%22%3E%3CP%3EI%20got%20the%20VBA%20to%20work.%26nbsp%3B%20My%20questions%20is%20there%20a%20snippet%20that%20can%20be%20added%20to%20the%20VBA%20code%20to%20make%20the%20image%20insert%20into%20a%20specif%20cell%3F%20For%20example%2C%20if%20the%20url%20is%20in%20cell%20C3%20and%20I%20want%20the%20image%20to%20be%20in%20cell%20D3%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309121%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309121%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20sorry%2C%20I%20meant%20that%20the%20images%20are%20not%20placed%20in%20the%20cells.%20They%20are%20floating%20and%20stacked%20on%20top%20of%20each%20other.%20Since%20I%20have%20over%201000%20urls%20to%20convert%2C%20I%20wanted%20to%20know%20if%20there's%20a%20way%20to%20place%20the%20resulting%20images%20in%20cells.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309120%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309120%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20easily%20change%20the%20%3CSTRONG%3EHeight%3C%2FSTRONG%3E%20and%20%3CSTRONG%3EWidth%20%3C%2FSTRONG%3Eto%20make%20the%20images%20fit%20the%20cells.%3C%2FP%3E%3CP%3ETry%20to%20change%20the%26nbsp%3BHeight%20from%20100%20to%2030%20and%20the%20Width%20from%20100%20to%2060.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E.Width%20%3D%2060%3CBR%20%2F%3E.Height%20%3D%2030%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309080%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309080%22%20slang%3D%22en-US%22%3E%3CP%3EI%20tried%20something%20similar%20to%20that.%20The%20issue%20I%20had%20was%20when%20I%20ran%20the%20module%2C%20the%20images%20loaded%20onto%20the%20spreadsheet%20in%20a%20stack%20or%20layered%20on%20top%20of%20each%20other%20instead%20of%20in%20cells.%20Do%20you%20know%20if%20I%20could%20make%20that%20happen%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309057%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309057%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Michael%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20formula%20can%20help%20in%20this%20regard!%3C%2FP%3E%3CP%3EYou%20need%20a%20VBA%20code%20or%20a%20third-party%20add-in%20to%20view%20these%20images.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20check%20out%20this%20%3CA%20href%3D%22https%3A%2F%2Fwww.extendoffice.com%2Fdocuments%2Fexcel%2F4212-excel-insert-image-from-url.html%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-413357%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-413357%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20have%20a%20file%20having%20one%20column%20consist%20of%20many%20URLs%20and%20in%20next%20column%20I%20wish%20to%20convert%20these%20URLs%20into%20real%20images.%20I%20am%20using%20office%202007.%20Please%20find%20the%20file%20as%20attached.%20Kindly%20help%20me%20to%20convert%20this%20file%20.%20Looking%20forward.%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3EHi%20Michael%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20formula%20can%20help%20in%20this%20regard!%3C%2FP%3E%3CP%3EYou%20need%20a%20VBA%20code%20or%20a%20third-party%20add-in%20to%20view%20these%20images.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20check%20out%20this%20%3CA%20href%3D%22https%3A%2F%2Fwww.extendoffice.com%2Fdocuments%2Fexcel%2F4212-excel-insert-image-from-url.html%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-413359%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-413359%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20have%20a%20file%20having%20one%20column%20consist%20of%20many%20URLs%20and%20in%20next%20column%20I%20wish%20to%20convert%20these%20URLs%20into%20real%20images.%20I%20am%20using%20office%202007.%20Please%20find%20the%20file%20as%20attached.%20Kindly%20help%20me%20to%20convert%20this%20file%20.%20Looking%20forward.%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3EHi%20Michael%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20formula%20can%20help%20in%20this%20regard!%3C%2FP%3E%3CP%3EYou%20need%20a%20VBA%20code%20or%20a%20third-party%20add-in%20to%20view%20these%20images.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20check%20out%20this%20%3CA%20href%3D%22https%3A%2F%2Fwww.extendoffice.com%2Fdocuments%2Fexcel%2F4212-excel-insert-image-from-url.html%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-432196%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-432196%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F316986%22%20target%3D%22_blank%22%3E%40rsinghal2019%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20that%20the%20links%20in%20the%20file%20aren't%20valid%20when%20you%20open%20them%20in%20the%20browser!%3C%2FP%3E%3CP%3ETherefore%2C%20I%20don't%20think%20that%20the%20solution%20is%20applicable%20to%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-571559%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-571559%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20this%20code%20is%20very%20helpful%20thank%20you%3C%2FP%3E%3CP%3EI%20was%20wondering%20if%20there%20is%20a%20way%20to%20actually%20download%20the%20images%3F%3C%2FP%3E%3CP%3Eif%20i%20am%20understanding%20this%20the%20images%20we%20are%20seeing%20are%20just%20being%20generated%20from%20the%20link%20but%20are%20not%20hard%20files%20on%20the%20computer%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-579460%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-579460%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20you%20run%20the%20code%2C%20these%20pictures%20get%20saved%20locally%20in%20the%20workbook.%3C%2FP%3E%3CP%3EIf%20you%20want%20to%20extract%20them%20into%20a%20folder%20outside%20Excel%2C%20the%20trick%20is%20to%20save%20the%20workbook%20as%20a%20Webpage%20(*htm%3B%20*html)%20using%20the%20Save%20As%20dialog%20box.%3C%2FP%3E%3CP%3EAfter%20then%2C%20go%20to%20the%20webpage%20folder%20and%20find%20them%20inside%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F342777%22%20target%3D%22_blank%22%3E%40Alevizos%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-583514%22%20slang%3D%22en-US%22%3ERe%3A%20Convert%20image%20url%20to%20actual%20image%20in%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-583514%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETHANK%20YOU%20THANK%20YOU%20THANK%20YOU!!!!%3C%2FP%3E%3CP%3Eyou%20are%20an%20awesome%20individual%20thank%20you%20so%20much%3C%2FP%3E%3C%2FLINGO-BODY%3E
Michael Lovice
Occasional Contributor

I have a column of image URLs in my workbook and would like to show the actual image in the next column. Is there a formula or add in that can be used?

17 Replies

Hi Michael,

 

No formula can help in this regard!

You need a VBA code or a third-party add-in to view these images.

 

Please check out this link.

 

Hope that helps

I tried something similar to that. The issue I had was when I ran the module, the images loaded onto the spreadsheet in a stack or layered on top of each other instead of in cells. Do you know if I could make that happen?

You can easily change the Height and Width to make the images fit the cells.

Try to change the Height from 100 to 30 and the Width from 100 to 60.

 

.Width = 60
.Height = 30

I'm sorry, I meant that the images are not placed in the cells. They are floating and stacked on top of each other. Since I have over 1000 urls to convert, I wanted to know if there's a way to place the resulting images in cells.

I got the VBA to work.  My questions is there a snippet that can be added to the VBA code to make the image insert into a specif cell? For example, if the url is in cell C3 and I want the image to be in cell D3

Hi Michael,

 

The code is already programmed to place the image next to the link in the adjacent cell.

This is the result that I got when I run the code.

2019-01-07_19-46-17.png

 

Isn't that what you asking for?

That's EXACTLY what I'm looking for. But, When I run the code, the images are not placed inside cells. Would you please share with me the actual code you ran?

 

Thank you so much!

I've used the same code as in the link I mentioned before.

Sub URLPictureInsert()
'Updateby Extendoffice 20161116
'Update by Haytham 20180104

    Dim Pshp As Shape
    Dim xRg As Range
    Dim xCol As Long
    On Error Resume Next
    Application.ScreenUpdating = False
    Set Rng = ActiveSheet.Range("A2:A140")
    For Each cell In Rng
        filenam = cell
        ActiveSheet.Pictures.Insert(filenam).Select
        Set Pshp = Selection.ShapeRange.Item(1)
        If Pshp Is Nothing Then GoTo lab
        xCol = cell.Column + 1
        Set xRg = Cells(cell.Row, xCol)
        With Pshp
            .LockAspectRatio = msoFalse
            .Width = 60
            .Height = 30
            .Top = xRg.Top + (xRg.Height - .Height) / 2
            .Left = xRg.Left + (xRg.Width - .Width) / 2
        End With
lab:
    Set Pshp = Nothing
    Range("A2").Select
    Next
    Application.ScreenUpdating = True
End Sub

 

But I adjusted the Height and Width to make the images fit the cells.

Please note that the code may take up to 5 minutes to finish the process.

 

Hope that helps

I finally got it to work. I hadn't changed the insert cell location, just the url cell range.

Now I'm trying to figure out how to get the pics to scale with changing cell size. I've tried the following code  HERE  with no luck yet. Working with VBA is completely new to me. I appreciate your help and patience.

 

 

You can update the code like the following by adding this line to it:

Pshp.Placement = xlMoveAndSize

 

Sub URLPictureInsert()
'Updateby Extendoffice 20161116
'Update #1 by Haytham Amairah in 20180104
'Update #2 by Haytham Amairah in 20180108

    Dim Pshp As Shape
    Dim xRg As Range
    Dim xCol As Long
    On Error Resume Next
    Application.ScreenUpdating = False
    Set Rng = ActiveSheet.Range("A2:A140")
    For Each cell In Rng
        filenam = cell
        ActiveSheet.Pictures.Insert(filenam).Select
        Set Pshp = Selection.ShapeRange.Item(1)
        Pshp.Placement = xlMoveAndSize
        If Pshp Is Nothing Then GoTo lab
        xCol = cell.Column + 1
        Set xRg = Cells(cell.Row, xCol)
        With Pshp
            .LockAspectRatio = msoFalse
            .Width = 60
           .Height = 30
            .Top = xRg.Top + (xRg.Height - .Height) / 2
            .Left = xRg.Left + (xRg.Width - .Width) / 2
        End With
lab:
    Set Pshp = Nothing
    Range("A2").Select
    Next
    Application.ScreenUpdating = True
End Sub

 

This will change the property for each image after inserting it to make it move and size with the cell.

Hi, I have a file having one column consist of many URLs and in next column I wish to convert these URLs into real images. I am using office 2007. Please find the file as attached. Kindly help me to convert this file . Looking forward. @Haytham Amairah 

Hi, I have a file having one column consist of many URLs and in next column I wish to convert these URLs into real images. I am using office 2007. Please find the file as attached. Kindly help me to convert this file . Looking forward.


@Haytham Amairah wrote:

Hi Michael,

 

No formula can help in this regard!

You need a VBA code or a third-party add-in to view these images.

 

Please check out this link.

 

Hope that helps


@Haytham Amairah 

Hi, I have a file having one column consist of many URLs and in next column I wish to convert these URLs into real images. I am using office 2007. Please find the file as attached. Kindly help me to convert this file . Looking forward.


@Haytham Amairah wrote:

Hi Michael,

 

No formula can help in this regard!

You need a VBA code or a third-party add-in to view these images.

 

Please check out this link.

 

Hope that helps


@Haytham Amairah 

Hi @rsinghal2019,

 

It seems that the links in the file aren't valid when you open them in the browser!

Therefore, I don't think that the solution is applicable to them.

 

 

 

 

@Haytham Amairah 

Hi this code is very helpful thank you

I was wondering if there is a way to actually download the images?

if i am understanding this the images we are seeing are just being generated from the link but are not hard files on the computer?

 

Thanks

Hi,

 

After you run the code, these pictures get saved locally in the workbook.

If you want to extract them into a folder outside Excel, the trick is to save the workbook as a Webpage (*htm; *html) using the Save As dialog box.

After then, go to the webpage folder and find them inside it.

 

Regards

 

@Alevizos 

@Haytham Amairah 

THANK YOU THANK YOU THANK YOU!!!!

you are an awesome individual thank you so much

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies