Consolidating Data from Other Workbooks into One Workbook

时间:2016-08-31 17:41:49

标签: excel vba excel-vba consolidation

Current Situation: I am consolidating a data package that receives multiple inputs from programs that roll into mine. Essentially, each program provides me their set of data and I am responsible for accurately consolidating data into one Excel workbook in a certain format. I have pushed out a template so that all the data comes back in the same format, but now I am having trouble quickly consolidating besides using "copy and paste".

Solutions I've looked into: I've looked into using connections to see if can pull in the data I need through a connected file however it imports the table in a different format and does not transfer correctly into the consolidation template that I have set up. I tried doing external source referencing to pull in data that way, but again the formatting is off. I know there are ways to just pull in the workbook, but I need data from specific points in these program workbooks that I can slot into my consolidated workbook. In most cases, copy and pasting would work, but I have over hundreds of programs that flow into this data sheet so any help would be appreciated!

1 个答案:

答案 0 :(得分:1)

How about setting the destination range to the values of the source range? e.g.:

rngTarget.Resize(rngSource.Rows.Count, rngSource.Columns.Count).Value = rngSource.Value