I have a workbook with many tabs, all of which are identical in format. I want to have the same embedded charts in each worksheet. I can't seem to copy the charts from one tab to other tabs without the new data range being tied to the original worksheet tab name. My first choice is to refer to the data range as B6:B87 or =B6:B87 WITHOUT the reference being ='TabName'!B6:B87, but Excel doesn't seem to allow it.
Make copy's of the data range on the same page than cut it and past it on the page you want.it wont have the sheet name where it was copied.
Copy the entire sheet, including chart and data. The copied chart links to the data range on the copied sheet. Now replace the original data on the copied sheet with the new data. The copied chart links to the new data on the copied sheet.
Related
In Excel, I have 4 column headers (Id, Name, Age, Place).
I have 3 Excel worksheets with same column headers and different data.
I want to make a consolidated worksheet and the constraint is I have to check whether the column header is the same in all 3 worksheets and move it into the consolidated worksheet.
In the 1st worksheet I have values in the first row.
In 2nd worksheet, the first row is empty and the second row has data.
In 3rd worksheet, the first and second rows are empty and the 3rd row has data.
The 4th worksheet is the consolidated one. I want all 3 worksheet's data in this sheet.
How to do it with macros in vba?
There's built-in functionality for data consolidation.
You'll need to move your data so it's all on the same row but in the end will probably be much easier than writing code from scratch.
How to consolidate
Follow these steps to consolidate several worksheets into a master worksheet:
If you haven't already, set up the data in each constituent sheet by doing the following:
Ensure that each range of data is in list format. Each column must have a label (header) in the first row and contain similar data. There must be no blank rows or columns anywhere in the list.
Put each range on a separate worksheet, but don't enter anything in the master worksheet where you plan to consolidate the data. Excel will do this for you.
Ensure that each range has the same layout.
In the master worksheet, click the upper-left cell of the area where you want the consolidated data to appear.
Note: To avoid overwriting existing data in the master worksheet, ensure that you leave enough cells to the right and below this cell for the consolidated data.
Click Data → Consolidate (in the Data Tools group).
In the Function box, click the summary function that you want Excel to use to consolidate the data. The default function is SUM.
Here is an example in which three worksheet ranges have been chosen:
Select your data.
More information and the remaining instructions are at the source.
If you want to automate the process, record a macro as you performs the necessary steps and then you can edit as required.
See: Recording a Macro to Generate Code as well as Revising Recorded Visual Basic Macros. If you're not familiar with Excel (or whatever you're planning on automating with VBA), do that before attempting VBA.
This VBA tutorial is highly recommended: Excel VBA For Beginners and Microsoft's Documentation.
The issue that I am having is when I copy my table in excel(which is generated from running a query) and then special paste it into a power point slide.
The paste works but when I run the query in excel with different parameters it brings back a varying number of rows. The table in the slide will update using the same number of row from the original copy/paste. If the table grew it will only have up the the original number of rows, if it shrinks i get this.
The data is removed but the rows are still there
I found an answer on answers.microsoft.com.
The key is to create a named range and you have to use a workaround if your named range is an Excel table. I'll cover this workaround.
Let's say that you have a query that returns a table named DataTable. If you want to link to this table in PowerPower, first you'll need to create a named range that does not directly refer to a table.
Create a new Named Range under Formulas > Name Manager and name it TableAlias with a formula referencing a specific range, e.g., =Sheet1!$A$1.
Once you've created this alias, save the file and then paste the range referenced by your named range reference (Sheet1!$A$1, not the table you eventually want) into your PowerPoint slide using Home > Paste > Paste Special... > Paste Link > Microsoft Excel Worksheet Object. If things are working correctly at this point, you should be able to go to File > Edit Links to Files and see that the link is using the named range instead of an R1C1 range.
Now that it knows to use the named range, let's change the formula for TableAlias in the Name Manager to the range we actually want to link, =DataTable. Once the formula is updated and you've saved the document, the link in PowerPoint should update to this new range giving you a dynamic link to a table.
This process seems a bit finicky, but I did getting it working for me where if I added or deleted rows, then the PowerPoint slide would update the table range appropriately.
Ive got three worksheets setup.
The first contains reference data for my data validation list.
The second references the first sheet for a data validation drop down list. Something like sheet1!$a1:$a3
The problem arises when I try and copy the cell in sheet two that contains the data validation drop down list to a cell in sheet 3 where the destination cell is empty.
I'm trying to copy excel data validation but when copied across to sheet 3 it references the cells $a1:$a3 but doesn't maintain the reference to sheet1 where the data for the drop down list is actually stored.
How can I copy the data validation such that when it is copied to sheet 3 it still maintains the reference to sheet1 where the static data that makes up the list is.
If I am understanding you correctly, the pasted Data Validation list is not showing the corrrect information. In my workbook I needed multiple cells of DV to display info from the sheet labled "Parts" after they were copied to the sheet labled "Ascending".
What I had to do was select my newly, and thus far incorrectly, pasted material, go to the 'Data' tab and click into 'Data Validaion --> Data Validation' (drop down menu). From here I had to edit the source to reflect the origional sheet.
Was: =$C$4:$C$21
Edit: =Parts!$C$4:$C$21
This determines what sheet the data is being validated from. Once Ive done this, I can copy and paste a DV interal to whatever sheet I am working on.
For some reason naming the range from the origional sheet (Parts) did not carry over in the pasted DV. VLOOKUP and other formulas thankfully work fine.
I pasted a pivot table from excel to powerpoint and chose the embed option when doing so. The deck is now very large (20MB +) due to the embedded data. Is there a way to keep the table but just drop the embedded data?
The problem is likely because you're copying from a very large Excel workbook. When you embed even one cell from an Excel worksheet, the entire workbook actually gets embedded in the PowerPoint file.
One way around this is to select the information you want to embed, copy/paste it into a new Excel workbook (NOT a new worksheet w/in the workbook), then copy/paste/embed into PPT from the new temporary workbook.
At least this'd work with regular worksheet data; it may not work for Pivot Tables (they'd be dependent on other data that wouldn't get pasted from one worksheet to the other, I'm afraid). But it's worth a shot.
I've created a chart in a workbook. I want to copy and paste that chart into another workbook in such a way so that when I update the original data it automatically updates both charts.
Between Excel and Word there are no problems: I can paste the chart as link (see below):
but in Excel the same option seems to be disabled:
Any idea to solve my problem? The chart copied in the destination only updates if the original file is open, and the data changed!
Many thanks in advance.
I've not done this much, but when I have I generally just paste (i.e. Ctrl+C). The chart series should be automatically updated to refer to the source workbook, the relevant worksheet within that workbook, and keep the cell ranges the same.
So my thought would be that the option isn't disabled, it's just implicitly built in to the normal paste. Which would make sense; The use-case for keeping the same source range of cells, but on the new worksheet being pasted to (even inside the same workbook, let alone in a different workbook) is not exactly one that seems crazy useful.