Advertisement

04.29.2008 at 08:51PM PDT, ID: 23364359
[x]
Attachment Details

VBA to Copy Cells From One Worksheet to Another Worksheet

Asked by redrumkev in Microsoft Excel Spreadsheet Software

Tags: , ,

Experts,

In the attached workbook (EE-FROM_DATABASE-03-2008_NB.xls) I have a data import from a database on worksheet (DATA). What I want to do is create some code in VBA to copy most cells from (DATA) to (TEMP) but in a new order. The reason for this is that the export from the database comes in a specific format (from an .exe file), thus I must manually move this report around.

Right now, I really want to learn some basic VBA stuff, so if someone can give me some of the code, say how to copy one or two ranges, then I can do the rest. I will then have a follow-up set of questions, I am sure, as I need to do some formulas within the VBA, but I want to learn so one step at a time, right?!?!

1.      I want to copy all data in (DATA) column O, starting at O2 and going down to the end of the column, where data is present. I assume that something like .filldown would be needed, as each time this data is imported, it will occupy a different range (in terms of rows down). This data will end up in (TEMP) A2.

2.      Whatever is used for the above (select column O. copy to TEMP.A2, etc) can I do that over and over again?
As (DATA) P2 needs to be copied to (TEMP) B2,
Then
(DATA) A2 needs to be copied to (TEMP) C2, and so on.

Thank you in advance!

Kevin

***edited for content, M_matt***Start Free Trial
[+][-]04.29.2008 at 10:22PM PDT, ID: 21468255

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 10:34PM PDT, ID: 21468300

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 11:08PM PDT, ID: 21468411

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.29.2008 at 11:08PM PDT, ID: 21468414

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 11:11PM PDT, ID: 21468421

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 11:19PM PDT, ID: 21468444

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: Microsoft, Excel, 2003
Sign Up Now!
Solution Provided By: chris_bottomley
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.30.2008 at 06:57AM PDT, ID: 21470697

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 06:58AM PDT, ID: 21470713

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628