Copy excel icon set on another sheet - excel-formula

I created a series of cells with icon set. How can copy the last cell to another sheet including the icon set it currently have?. When i copied the last cell to another sheet, it does not preserve the same icon set.

With an in-built formula it can't be done without using something like VBA as well.

Related

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.

How to Paste into visible cells in a filter in Excel?

I have data in one workbook and I have filtered columns in another workbook, when I want to copy the data from one workbook and paste it to the visible cells in the filtered area, it gets pasted to the hidden cells as well.
I googled alot but nothing was useful even I tried the Kutools software but did not work.
How to paste the data into visible cells?
A workaround I like to use is to use reference in the filtered sheet. Slightly longer method, but it works. Follow the steps below
Set the reference in first cell. E.g. ='Sheet1!A1'
Click and drag to copy the formula to all cells below (or Copy, and Paste into multiple selection). DO NOT double click to fill down, as it will include hidden cells.
If needed, clear filter and copy- paste values
Let me know if this works for you.

Excel "Insert shapes" Color change based on cell value

Anyone knows how to Change the color of Shapes("Insert-> Shapes") based on the value of a cell. i could do this with the help of macro. but i now need the same to be done without the help of macro.
Kindly share the formula if anyone can do this.
thanks.
Example how to show the picture of a named range in a ActiveX image control:
Open Excel with a empty Worksheet Sheet1.
Write 0 in A1.
Create a named range using the Name Manager http://office.microsoft.com/en-us/excel-help/define-and-use-names-in-formulas-HA010147120.aspx#BMmanage_names_by_using_the_name_manage
to do so:
open Name Manager
click New
Name= Image
Refers To= =INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+1):INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+4)
OK
close Name Manager
now:
Take a ActiveX Image Control from Developer tab
(http://office.microsoft.com/en-us/excel-help/show-the-developer-tab-HA101819080.aspx)
Controls and put it in the Worksheet.
Overwrite the formula =EMBED(...) in the formula bar with =Image
(the name of the named range). Now, if you change the value in Sheet1!A1,
you should see the cells E[n]:E[m] with n=A1*4+1 and m=A1*4+4 as
picture in the Image Control. Try it by putting values in E1:E20
and change A1.
Now, if you place different shapes over E1:E4, E5:E8, E9:E12,... you
see them in the Image Control by changing the value in A1.
Edit April 2019:
This works using Excel 2007. It does not work in later Excel versions because the ActiveX Image control does not more accept cell ranges as source.
Just tested in Excel 365:
First do the same steps as above but then in last step
now:
Copy four cells of one column (A1:A4 for example) into the clipboard. It is not important from where the cells are coming.
In the sheet where the image shall appear do Home -> Paste -> Linked Picture. A picture showing the copied cells is pasted. And the formula bar shows the formula =Sheet1!$A$1:$A$4 for example.
Overwrite the formula in the formula bar with =Image (the name of the named range). Now, if you change the value in Sheet1!A1, you should see the cells E[n]:E[m] with n=A1*4+1 and m=A1*4+4 as picture in the pasted picture. Try it by putting values in E1:E20 and change A1.
Now, if you place different shapes over E1:E4, E5:E8, E9:E12,... you see them in the pasted picture by changing the value in A1.

Excel / VBA: auto-adjust column width after pasting data

I have a blank Excel table saved as a template into which I copy data from the clipboard (originating from a website).
Is there a way using VBA to auto-adjust the width of each column to its content after the data (text) has been pasted in ?
Edit: The data I paste will always be inserted starting from A1 and will always fill the same number of columns.
You can do it with AutoFit:
Columns("A:B").EntireColumn.AutoFit
You can perform the following:
Columns("A").Autofit
You can do it with a worksheet change event, but if your worksheet is changed in any way after the paste, it runs again. Not an issue unless you're trying to hide columns to focus on a subset of data because they will autofit themselves constantly.
I recommend using a button to paste the data and including the column width setting as part of the paste command.

How do you place a textbox object over a specific Cell when automating Excel?

We are automating Excel using VB.Net, and trying to place multiple lines of text on an Excel worksheet that we can set to not print. Between these we would have printable reports.
We can do this if we add textbox objects, and set the print object setting to false. (If you have another way, please direct me)
The code to add a textbox is:
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 145.5, 227.25, 304.5, 21#)
but the positioning is in points. We need a way to place it over a specific cell, and size it with the cell. How can we find out where to put it when we just know which cell to put it over?
If you have the cell name or position, you can do:
With ActiveSheet
.Shapes.AddTextbox msoTextOrientationHorizontal, .Cells(3,2).Left, .Cells(3,2).Top, .Cells(3,2).Width, .Cells(3,2).Height
End With
This will add a textbox over cell B3. When B3 is resized, the textbox is also.
When you copy & paste a textbox, Excel will place the new textbox over whichever cell is currently selected. So you can achieve this very easily by simply using the VBA copy & paste commands. This can be particularly useful if you are going to be using a lot of very similar textboxes, as you are effectively creating a textbox template.

Resources