PDA

View Full Version : Solved: Copying between sheets



tomcoll67
04-07-2009, 11:52 AM
Hi,
I am new to VBA and am looking for a way to get the cell data from a merged cell (AP AQ AR) in worksheet3 that is in a dataform and use it to send data from cell that is merged from Row 10 columns B through AF to Row 14 same columns. and move to Sheet 1.
The trick is that I need to use the number from the first merged cell(AP-AR) and add a value of three to it to denote the row to write to. The column will always be O.
There are other items I need to do but if I can get an understanding of these I think I would be able to do the rest.
I thank anyone who could help.
Tom :banghead:

IkEcht
04-08-2009, 04:43 AM
Hi Tom,

First of all welcome at Vbax. The information you give is hard to understand. Could you post a workbook explaining what you mean to do?

tomcoll67
04-08-2009, 06:35 AM
Here is a mockup of what I am trying to do
Basically it is to take a control number and add three to the number to get a row number on another sheet.
then I want to take the button and code the ability to copy from the sheet one (A B C and D boxes to sheet 2 (A B C D columns)using the row number that would change and column numbers that will not change.
I apologize for not being clearer.
thank you
Tom:dunno

tomcoll67
04-08-2009, 06:36 AM
:banghead: Sorry it did not upload the first time.
Here is the atachment
thank you,
Tom

IkEcht
04-08-2009, 06:41 AM
So basicly in pseudo code what you want is..

randomnumber = sheet3.ar(i).value + 3
sheet2.range(A & randomnumber) = sheet1.boxA.value
sheet2.range(B & randomnumber) = sheet1.boxB.value
sheet2.range(C & randomnumber) = sheet1.boxC.value
sheet2.range(D & randomnumber) = sheet1.boxD.value

Or am I still misunderstanding you?

tomcoll67
04-08-2009, 08:18 AM
I believe that would be correct in pseudocode.
Thank you
I now need to figure it out in VBA.
thank you