Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

MERGE TWO SHEET IN ONE NEW SHEET

  Asked By: Jamil    Date: Sep 08    Category: MS Office    Views: 1914
  

In one Excel file(i.e. Workdone) I have three Sheets... i.e. Sheet 1 as
WorkA, Sheet 2 as WorkB and Sheet 3 as WorkC..

In all this sheets I am daily entering some data....
*i.e. In Sheet 1 (WorkA) *
Row1 Date----- Name-------- Amount
Row2 01/04/08 Mr.A 5000.00
Row3 05/04/08 Mr. B 25000.00

*Sheet 2 (WorkB)*

Row1 Nature Status ------- Amount
Row2 Daily Done 25000.00
Row3 monthly Balance 15000.00

*Sheet 3 (Work C)*

Row1 CellNo. Priority ------- Name
Row2 123456 Normal Mr. A
Row3 132313 Urgent Mr. C


*Now, My requirement is I want one Macro or button by clicking I want the
result as follows :*

1. In My Sheet 4 (i.e. Report) first all the data will be deleted.

2. From Sheet 1 i.e. WorkA all the rows (upto the last row where I have
done the entries) will be copied and pasted into Report Sheet from top of
the sheet.
*More details :* If in Sheet 1 I have done last entry at Row 50, all the
Rows i.e. Row 1 to Row50 will be copied at Report Sheet

3. After that All the Rows from Sheet 2 i.e. WorkB will be copied from Top
of the Sheet 2 to the last row of the Sheet 2 will be copied into after Two
Rows of Report Sheet.

*More Details* : As per the above No. 2 I have copied rows 1 to Rows 50 from
Sheet 1 into Report Sheet. After that the Two Rows must be blank. Now from
Rows 52, all the rows of sheet 2 will copied here.

4. and in the same way, After that All the Rows from Sheet 3 i.e. WorkC will
be copied from Top of the Sheet 2 to the last row of the Sheet 3 will be
copied into after Two Rows of Report Sheet.
*
IN SHORT I WANT TO MARGE MY SHEET 1, SHEET 2 AND SHEET 3 (ALL ROWS OF THE
RESPECTED SHEETS ) INTO REPORT SHEET AFTER ONE BY ONE BY GIVING TWO BLANK
ROWS.*



Hope that you will understand my requirement and help me to solve the
problem...

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Muntasir Bashara     Answered On: Sep 08

Sub Merge_ABC()
Dim rng As Range, ws As Worksheet
Set ws = Sheets("Report")
ws.Cells.ClearContents
Sheets("WorkA").UsedRange.Copy ws.Range("A1")
Sheets("WorkB").UsedRange.Copy ws.Range("A" & ws.Range("A65536").End
(xlUp).Row + 3)
Sheets("WorkC").UsedRange.Copy ws.Range("A" & ws.Range("A65536").End
(xlUp).Row + 3)
End Sub

 
Didn't find what you were looking for? Find more on MERGE TWO SHEET IN ONE NEW SHEET Or get search suggestion and latest updates.




Tagged: