Make excel worksheet mirror worksheet in external file - excel

How can I make a worksheet in my excel file mirror exactly the sheet of a different (closed) worksheet.
Basically, I have around 5 files with a lot of data the gets consolidated into a single dashboard with the important information. I then want to create a file (lets call it report) that has the 'main' sheet from each of these different files.
Ideally, the report file will not have to be altered, and when it is opened it will already have all the data needed.
Note: there are merged cells in the documents that are in variable positions.
response to comment #1:
By be there already, for example you can do a vlookup referencing other workbooks.. and the values of those vlookups will be correct when you open the file. First I thought I could just say cell A1 is file 1 = cell A1 in file 2, but the merged cells throw that off because it will not create merged cells to match

I found the following and it can be done in Excel VBA.
1) open consolidated workbook
2) Assuming that all the files you need to consolidate are in a given directory, you can obtain the list of all these files.
2.1) Traverse the list of files and open them one after the other
2.2) When a file is open, you might want to change the name of the sheet before moving it to the "report" file.
2.3) Close each file without saving them.

Related

Excel formula to reference cells in another (closed) workbook with dynamic file path

Here's my desired outcome: I want an Excel workbook (say Master.xls) that I can drop into a directory of other Excel workbooks and Master.xls will extract a given range of cells from all of the hundreds of other workbooks in that directory. I have multiple directories with hundreds of Excel files in each, so I need a Master.xls file that will easily move between directories with different file paths and update based on the files around it in the directory. In my Master.xls file, I can build the file names for all of these other workbooks using text functions like CONCATENATE.
The problem comes when I try to use Excel to reference cells in workbooks that are not currently open. The problems:
INDEX can access closed workbooks using hard-coded paths, but can't (as far as I can tell) accept cell ranges as text. To enter cell ranges as text to other functions, one has to use the...
INDIRECT function, which doesn't work for closed workbooks.
Basically, INDEX can solve my problem but I can't figure out how to get it to work without hard-coding the paths to the closed workbook into the function call. That's a deal breaker, since I have thousands of workbooks to reference and doing a find-replace to change the file path for each workbook is time-prohibitive and not maintainable.
Other constraints: no Excel add-ins since this sheet has to be shared with others and no VBA because this has to be used by people with fear of macros. I recognize that Excel is not the right tool for this job. Believe me, if I could use another tool, I would.
Update: sample Excel sheet showing the problem:
Going straight to the source at MS Office support, INDIRECT does not work with external workbooks.

how to lookup image from different excel

I am creating an excel workbook file with one of the column containing a title of an image that is in another excel workbook file, that excel file contained huge database of images how to lookup images form that excel workbook file with their individual title
Note: these are two different Excel workbooks. And the condition is we can't merge file because imageDatabase file is so heavy up to 25MB for that reason excel is get not responding or force close.
file for example:
https://drive.google.com/a/flygoldfinch.com/file/d/0B9VV_J4sKTatdDBEZ01GNHg3Y0k/view?usp=docslist_api
Any reference to a cell in Excel can be performed on any other sheet, be it in the same file, or an outside file.
A reference to another sheet within the file looks like this:
='sheetname'!M20
The same thing works if that sheet is in a different file
='[file.xlsx]sheetname'!$H$726
Knowing that the reference will work that way, you can write any formula with it. This includes VLOOKUPs, or anything else you need to do.
A good shortcut to make this easier is to have both files open, click the cell you want to make the reference in, type =, then switch to the other file, click the cell you want, and hit return. Your reference is made.

How can I have single worksheet in .CSV converted from multiple worksheets of .xlsx file

How can I convert a multiple worksheet .xlsx file into a single worksheet(containing all 3 worksheets info > means merged) .CSV file.
I can just do the save into other format in microsoft excel, it doesnt merge all the sheets.
How can I have a single sheet containing all the info in .csv format.
Here is the Ex file: File
I guess this isn't automatically supported simply because it's not always clear how this should be done. Also, it involves loss of information - having merged all the sheets, how would you un-merge them later if you re-opened the file. What if it was important to the meaning of the date which sheet it was in?
I'd simply suggest using Excel to copy the data from each sheet into a new sheet containing all the data merged exactly as you would like, then save that sheet as csv.

Copy a column of formulas to a closed workbook in Excel

I have a lot of data into Excel files.
There are about 174 files. Each is named Book2.xslx through Book174.xlsx
I have a master document where I have a column of formulas that I would like to paste (or insert) into each of these spreadsheets without having to actually open each one individually.
Does someone know any code I can use to do this?
As an example, I would say I would want to copy the range P:P - the whole of column P - and insert it or paste it into Column P in the closed workbooks.
Can this be done? If it works , and I want to insert different ranges and cells every time I wanted something different inserted or pasted? Or is there a macro for example, that I could run , that would copy what I've selected to the same place in every unopened spreadsheet named Book*.xlsx?
You cannot do this on existing files without opening them (whether in Excel, or using FSO, as the Object Model won't be available to apply to those files
having said that, it is possible to automate the modifications using VBA.
If you would post your code, we can help you improve it or resolve any issues with bugs or performance

How to copy data from another workbook and paste onto related group rows?

How do I copy data from all the workbooks in the folder onto workbook 1 into it's corresponding row groups?
The attached images shows the sample worksheet is the file I want to paste data into (main template) and wb2 sample is a sample of one of the worksheets in the folder that I want to copy data from.
As you can see, the workbook 2 does not include all of the tasks. So I need to copy all of the data from workbook 2 and paste it on the corresponding row group (col A) on original workbook. I then need to do this for all workbooks in the folder.
Any help would be most appreciated!
To get the list of files, you will need to modify the code provided in this answer:
http://www.ozgrid.com/forum/showthread.php?t=65530
(you will need to read some documentation to select only xls files)
To open each of those files, read the documenation on opening files. This url can get you started:
http://p2p.wrox.com/excel-vba/10510-opening-excel-file-vba.html
After that, you will need to copy data from one workbook to another. See this url:
http://www.ozgrid.com/forum/showthread.php?t=18728
I know this isn't a very complete answer, but your question isn't terribly clear.

Resources