Hi,
I want to copy the values from a non-contiguous vertically arranged range of data (a mixture of strings and currency) from a source workbook into a contiguous horizontally arranged dataset in a different workbook. I've gotten the following code so far, but is there a way to do it faster?
Some of the source cells have formulae, so I only want the values.
When I run the macro it takes several seconds to process. I need to scale this up so it's looping through up to 100 separate source files and am trying to be as efficient as I can. Is there a different approach I should consider?
I want to copy the values from a non-contiguous vertically arranged range of data (a mixture of strings and currency) from a source workbook into a contiguous horizontally arranged dataset in a different workbook. I've gotten the following code so far, but is there a way to do it faster?
Code:
wbDest.Sheets("Data").Range("A" & i).Value = wbSource.Sheets("Summary").Range("B1").Value
wbDest.Sheets("Data").Range("B" & i).Value = wbSource.Sheets("Summary").Range("B2").Value
wbDest.Sheets("Data").Range("C" & i).Value = wbSource.Sheets("Summary").Range("B3").Value
wbDest.Sheets("Data").Range("D" & i).Value = wbSource.Sheets("Summary").Range("B4").Value
wbDest.Sheets("Data").Range("E" & i).Value = wbSource.Sheets("Summary").Range("B6").Value
wbDest.Sheets("Data").Range("F" & i).Value = wbSource.Sheets("Summary").Range("B8").Value
wbDest.Sheets("Data").Range("G" & i).Value = wbSource.Sheets("Summary").Range("B15").Value
wbDest.Sheets("Data").Range("H" & i).Value = wbSource.Sheets("Summary").Range("B16").Value
wbDest.Sheets("Data").Range("I" & i).Value = wbSource.Sheets("Summary").Range("B17").Value
Some of the source cells have formulae, so I only want the values.
When I run the macro it takes several seconds to process. I need to scale this up so it's looping through up to 100 separate source files and am trying to be as efficient as I can. Is there a different approach I should consider?