copy & Paste

B

bijan

Hi all
I am looking for a vba solution for copy&paste or something else to join 3
sheets to one sheet like this sample:
sheet1: sheet2:
sheet3:
___date_______amount1 ___date_______amount2 __date_______amount3
1 2006/01/01 11111.00 1 2001/01/01 44444.00 1 2002/01/01 77777.00
2 2002/01/01 22222.00 2 2003/01/01 55555.00 2 2004/01/01 88888.00
3 2005/01/01 44444.00 3 2005/01/01 55555.00 3 2001/01/01 77777.00

Target sheet
___date_______amount1_____amount2_______amount3
1 2006/01/01 11111.00
2 2002/01/01 22222.00
3 2005/01/01 44444.00
4 2001/01/01 44444.00
5 2003/01/01 55555.00
6 2005/01/01 55555.00
7 2002/01/01 77777.00
8 2004/01/01 88888.00
9 2001/01/01 77777.00
Thanks in advance
Bijan
 
D

Don Guillett

Try this. Change sheet4 to your master sheet name

Sub consolicatesheets()
For i = 1 To Sheets.Count
MsgBox Sheets(i).Name
If Sheets(i).Name <> "Sheet4" Then
With Sheets("sheet4")
dlr = .Cells(Rows.Count, 1).End(xlUp).Row + 1
slr = Sheets(i).Cells(Rows.Count, 1).End(xlUp).Row
Sheets(i).Cells(2, 1).Resize(slr, 3).Copy .Cells(dlr, 1)
End With
End If
Next i
End Sub
 

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