PDA

View Full Version : Reading data from one spreadsheet into another using VBA



Coldfire46
08-02-2015, 02:59 PM
Hi all,

I've used VBA for very simple tasks before so am familiar with the basics, but I'm trying to do something a little more complicated this time and I'm hoping for some pointers to get me started. Here's what I'm trying to do:

I have an Excel workbook which acts as an auto-loader to another piece of software, and I have a number of other excel workbooks that contain data that needs to be fed into the autoloader in the correct format. Up to now, I've been doing this manually, but am trying to learn VBA so that I can automate the process and save myself a lot of time. I'm hoping to create a macro (linked to a command button) that will do the following:

open up the auto loader workbook
create a unique alpha-numeric identifier for each row of data to be read into the auto-loader
based on the headings within the auto-loader worksheet, pull the correct data from in the input worksheet through to the auto-loader.
when one row of data is complete, move on to the next row until all the data from the input worksheet has been loaded into the auto-loader worksheet.


Things to note;


There are multiple tabs within each input worksheet, and several of them need to be used to complete the auto-loader worksheet.
There are some headings in the auto-loader that are calculated using formulae, or that need to filled in manually (e.g. start and end dates)


If anyone could give me any pointers on where to begin with this, I would be extremely grateful.
If what I have said is not clear then I will happily provide further detail

Thanks in advance

p45cal
08-02-2015, 03:38 PM
cross posted:
http://stackoverflow.com/questions/31776981/reading-data-from-one-excel-spreadsheet-into-another
http://www.ozgrid.com/forum/showthread.php?t=196165&p=753371#post753371

Coldfire46, take this seriously: http://www.excelguru.ca/content.php?184