Office Software Thread, Macros in Excel 2003 in Technical; Hi,
I am trying to create a macro that will collect information from particular cells in an Ecel spreadsheet (A) ...
2nd April 2009, 03:38 PM #1
- Rep Power
Macros in Excel 2003
I am trying to create a macro that will collect information from particular cells in an Ecel spreadsheet (A) and copy and paste them into another spreadsheet (B).
I can do this no problem, but the issue is that I want to run this same macro on a number of different spreadsheets, so that all the information get pasted into spreadsheet B.
How can I do this so that the information selects the next available column or row to paste to, rather than always pasting into the same row, therefore replacing data or throwing out an error message?
IDG Tech News
8th May 2009, 05:09 PM #2
Have a look at this code
r = 0
n = 0
For i = 1 To 3
n = n + r
r = Selection.Rows.Count
Cells(1, 1).Offset(n, 0).Select
It merges all data from the first 3 worksheets in to the 4th worksheet
I'm sure you'll work out how to adapt it to meet your requirements
Hope it helps
By pennywest in forum Windows
Last Post: 30th November 2009, 07:41 AM
By kennysarmy in forum Windows
Last Post: 12th December 2008, 08:04 PM
By jcs808 in forum Office Software
Last Post: 24th September 2008, 11:59 AM
By jodielynn in forum Windows
Last Post: 16th May 2007, 05:19 PM
By danIT in forum Windows
Last Post: 28th September 2006, 02:17 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread