How can I get information from 1 page to be separated into two linerecord on page 2?

L

Lolly

I'm stuck. I want to have a procedure which will use data from one
page and write it on another page in different relative locations

I have page 1 looks like this:
Name Job Desc. Status ...... Reg Base ... RegFringeBenefit
OTFringeBenefit ....
Smith Acct. FT $42.50 .
4321 .1043
Jones Mgr PT $35.22 .
4329 .0923

Page 2 looks like this
2/12 2/13 2/14
2/15
Name Smith FT REG.......
8......8.....8.....8................... $42.50 ... .4321 .....
JobDesc Acct OT 4 6 12
12 $63.75 ... .0923 ....
..... dots represent columns

I need a VBA subprocedure which will write all of the names and other
information for each person on the second sheet. As you can see, it
is not a matter of copying the record. The information is used in a
different manner. The thing that I couldn't figure out was how to
write it to two different rows.
 
M

Moises

Lolly,

I coudl not figure out the correct order of your columns inthe page number
two, however, the following code has the basic principle that you need :

For i = 1 To 2
Worksheets("Sheet2").Cells(i, 2) = Cells(i + 9, 4)
Worksheets("Sheet2").Cells(i, 3) = Cells(i + 9, 7)
Next


"For i= 1 to 2" is the range of rows that you have in first page, just
modify the starting and end row.

The "Worksheets("Sheet2").Cells(i, 2) = Cells(i + 9, 4)" , Sheet2 is
the name of your second page, cells (i,2) is the cell that will receive the
value in page 1, with the position i+9,4 , in my example the Name was in
cell (10,4) equal to "D10" .

Just modify those codes to map your output and input.

I hope this helps you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top