Excel linked pictures change scale after copying sheet - excel

I have created a dashboard sheet by using the camera tool to paste graphs from other sheets as linked picture in the dashboard sheet. When I copy the whole sheet (by right clicking the sheet tab) and paste it as a new sheet in the same workbook, the scale of my graphs reverts to the scale of the original graph. This results in the whole dashboard being distorted with overlapping graphs.
What did I do already:
googled it
I have tried numerous combinations of "Lock aspect ratio" and "Relative to original picture size" under Size, and "Move but don't size with cells", "Don't move or size with cells" under Properties.
It looks like copying every object one by one works, but if you copy the whole sheet it distorts everything.
Another guy posted exactly the same problem here but he didn't get any answer.
It would be great if someone is able to help me with this annoying problem.
Johan

I had the same problem - when copying a worksheet with a paste link picture and it loses scale
I got around it by creating a text box in the origin square and then putting the picture into the text box
Then when copying the sheet with the linked picture file it does not lose scale

I found a way around
Create a chart object (delete all chart related graphics = empty area).
Set width, height of chart object equal to your linked picture.
Click your linked picture to select and copy (Ctrl+C) then unselect.
Click chart object to select and paste (Ctrl+P)
DONE!
Now, your linked picture size won't change anymore

Related

Transfer pictures from one workbook to another

I would like to build two workbooks. Workbook A contains a list of animals and pictures as raw data; Workbook B contains a list of animals, and could automatically get their corresponding pictures from Workbook A.
If they were numbers or texts rather than pictures, we could connect the two workbooks by external links (to ranges or names), or by Power Query. But it seems that external links or Power Query don't work with pictures?
Does anyone know how connect two workbooks to achieve this? Does anyone know if it is possible to assign a picture to a cell?
You can use a vlookup-type of setup where the picture changes based on the value entered into a cell. There is an explanation here: https://exceloffthegrid.com/automatically-change-picture/
You'll have to use paste as link or link to picture. I personally cannot test this because Office 365 has paste as link disable right now.
EDIT:
I figured out how to work around Excel.
Insert a Pic
Size it down to the desired cell height/width
Don't click on the pic with the mouse, but move the directional keys with the keyboard (i.e., the green selection [] box) to the cell behind the pic.
Control + C to copy, not the mouse
Pastespecial as linked picture
So, I can't see how you can link them directly but you can use VBA to copy the picture from one workbook to another. You may not like that approach but it's plausible in theory.
Your question regarding whether or not a picture is linked to a cell is a firm yes.
A picture in Excel is classed as a shape. You can loop through each shape and determine if it's a picture or not and then from there, you can copy it from one workbook to another into any cell you care to specify.
The cell the picture resides in can be determined from the TopLeftCell property of the shape itself.
You can test that via this (sandboxed) code below.
Public Sub CopyPictures()
Dim objShape As Shape, objFromSheet As Worksheet, objToSheet As Worksheet
Set objFromSheet = ThisWorkbook.Worksheets("From")
Set objToSheet = ThisWorkbook.Worksheets("To")
For Each objShape In objFromSheet.Shapes
If objShape.Type = msoPicture Then
objShape.CopyPicture
objToSheet.Range(objShape.TopLeftCell.Address).PasteSpecial
End If
Next
End Sub
Open a new workbook and create two sheets, name them "From" and "To".
Copy a few pictures into the "From" sheet and then run the macro.
If you're happy using VBA then the above code will give you a starting point of getting the image from one workbook to another. You just have to fill in the gaps and write the logic around it.
Is it straight forward? Depending the desired outcome, it may very well not be. All possible though with time and effort.
I know that it's not perfect method, but this might help you.
In Workbook A images should be put on specific cell and perfectly located. e.g. C2:
In Workbook B you need to put an image, you can paste any image, then select the picture and put the link to cell of Workbook A as a formula: =[Book1]Sheet1!$C$2

Is possible to mirror a chart in another place?

I have a chart on one excel worksheet, and I want to show it in another worksheet without moving the original chart.
I do not want to copy and paste it, because if I modify the original chart (for example, changing his format), it will not be reproduced in the copy.
Is possible to hack it to show the chart in another page? Maybe a picture whose image is automatically taken from the original chart?
I frequently modify the original chart, and I have another worksheet where I watch many charts at once.
This can be done with a dynamic image, without VBA.
It will work best if the original chart is perfectly aligned with a range of cells.
select the range of cells behind the chart, for example A1:D10. You may want to give that range a name with the Name Manager, i.e. myChart, for convenience
on the Home ribbon, click the Copy dropdown and select "Copy as Picture"
accept the defaults "as shown on screen" and "picture" and hit OK
in the target worksheet (in the SAME workbook), select a cell and paste from the clipboard
select the pasted image and click into the formula bar. Enter the cell range you copied it from into the formula bar, e.g. =Sheet1!$A$1:$D$10, or, if you have set up a name, use that, like =myChart
The image is now dynamic and will reflect whatever content is showing in the specified cell range. If you resize the original cells, the dynamic image will distort.
Be aware that you are not creating an image of the actual chart, but only of the cells that the chart covers. If you move the chart away from the range, then it will not be visible in the dynamic image.
That's why this technique works best if the chart is perfectly aligned with a range of cells.
More details about this technique, using it to create combination Sparklines is in this article written in 2011, but everything still applies.

Powerpoint: Linking Excel charts & updating them or deleting old charts & inserting updated ones?

I have a PowerPoint presentation containing Excel charts and .png files. This presentation needs to be updated fairly often and I’d like to use VBA for this. However, I’ve read up on linking charts from Excel to Powerpoint and it seems not to be bug-free, but I don't really know anything about it.
So I need advice what makes the most sense because I don't have any experience with this. Is updating the charts usually not an issue? Or would it be more fool-proof to delete the old charts and insert the new ones? In case it's the latter, would I simply define the dimensions of the chart or does the use of placeholders offer any advantages?
What I've done in the past is use VBA to paste pictures of the charts into the slides. Then the presentation serves as a snapshot, and I don't need to worry about links.
You can set up a table with details like chart name, worksheet name, slide number, image size (width, height) and position (left, top). Then the code moves down the list, finding the worksheet, copying the chart, activating the slide, pasting the chart as a picture, moving it into position. Best results are when the chart is sized right in Excel so you don't need to resize it in PowerPoint.
It's been a while, so I don't have that code at my fingertips. I'll hunt around when I have a chance.

Inconsistent colors in Excel/PowerPoint/Word Charts

I have two scatter plots, representing the same things, but for two different scenarios. They were created in the same Excel workbook, on different sheets, and I have the same color schemes applied to them. However, the colors don't line up between the charts. I have 6 charts total, and 4 start with the dark color and the other 2 start with a lighter color.
Chart 1 - first color is very dark
Chart 2 - first color is lighter
I haven't been able to find anyone else who's run into the same problem. This issue occurs when I copy the charts into PowerPoint and Word as well. This is pretty annoying because I want to keep the colors consistent throughout my charts.
EDIT I can copy the chart with the colors I want and then just edit the data, so the charts are all consistent. Still not sure how they ended up different colors, though.
I've run into this issue in the past. I've looked around and found the following suggestions.
After copying the chart from Excel, when you're in either Powerpoint or Word, click on the downward arrow for "paste", then try to do any one of the following:
'paste special' then 'paste link'; or
'paste options' then 'keep source formatting'; or
'paste options' then paste as 'picture'.
The last one should definitely work, since you're pasting a static photo. That is, it will be uniform regardless of the program because it's based on the calibration setting of your monitor.

Picture shows in excel if a threshold is hit

I am creating an excel spreadsheet to track sales quota. I would like the spreadsheet to display a picture of fireworks when quota is hit. I don't know that much about macros, but good with formulas but that doesn't seem to help. Any ideas?
One way that I know it can be done:
1) Paste the picture of the fireworks in a cell (say A1) in a separate (preferably hidden sheet). Make sure to resize the cell (or the picture) so that the picture completely fits inside cell A1.
2) Define a named formula, maybe named "fireworks", which goes like:
=IF([Your condition for the fireworks to show],INDIRECT("[cell in which firework pic is]"),INDIRECT("[any blank cell"))
like for eg:
=IF(Sheet1!$C$6=TRUE,INDIRECT("Sheet2!$a$1"),INDIRECT("Sheet1!$M$8"))
3) Go to 'Insert' tab, click Object, click bitmap image. If paint or any image editor opens up just close it, so it inserts a blank image/object into the sheet. This image will have "=EMBED("Paint.Picture","")" in the formula bar. Replace this with a reference to our named formula, like =fireworks
4) Resize and reposition this image/object. When the condition is satisfied, the pic should pop up.

Resources