Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
do we have a small visual basic command with the help of which we ca
copy the used range in sheet2 and paste it below used range in sheet1 i have that big macro but i want to have simpler way anyone can help? thanks a lot frnd -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
Sub Append ()
Dim rwct Sheet1.Activate rwct = ActiveSheet.UsedRange.Rows.Count Sheet2.Activate ActiveSheet.UsedRange.Select Selection.Copy Destination:=Sheet1.Range("A" & rwct + 1) End Sub Mike F "vikram " wrote in message ... do we have a small visual basic command with the help of which we can copy the used range in sheet2 and paste it below used range in sheet1 i have that big macro but i want to have simpler way anyone can help? thanks a lot frnds --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
On which line does the error occur?
"vikram " wrote in message ... not working frnd. shows subscript out of range --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
Sub Tester2()
Dim rng As Range Set rng = Worksheets("Sheet1").UsedRange Worksheets("Sheet2").UsedRange.Copy _ rng.Rows(rng.Rows.Count + 1).Cells.Resize(1, 1) End Sub Assumes your sheets are named Sheet1 and Sheet2 -- Regards, Tom Ogilvy "vikram " wrote in message ... not working frnd. shows subscript out of range --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
Dim vikram
Sheets("Sheet1").Activate vikram = ActiveSheet.UsedRange.Rows.Count Sheets("sheet2").Activate ActiveSheet.UsedRange.Select Selection.Copy Destination:=Sheet1.range("A" & vikram + 1) End Sub error occurs in "Selection.Copy Destination:=Sheet1.range("A" & vikra + 1)" it says copy area and paste area are not same size i have range from "a:z" in sheet 2 and the same range inn sheet -- Message posted from http://www.ExcelForum.com |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
thanks a lot tom it is working
thanks to u also mike...u guys are grea -- Message posted from http://www.ExcelForum.com |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
join sheet 2 below sheet 1
Try this pal
Sheets("Sheet1").Select Range("A1").Select ActiveCell.SpecialCells(xlLastCell).Select x = ActiveCell.Row ActiveSheet.Cells(x + 1, 1).Select x = ActiveCell.Address Sheets("Sheet2").Select Range("A1").Select ActiveCell.SpecialCells(xlLastCell).Select p = ActiveCell.Address a = "a1" Range(a, p).Select Selection.Copy _ Destination:=Worksheets("sheet1").Range(x) Good Luck Ross |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel sheet bootom half sheet goes behind top part of sheet | Excel Worksheet Functions | |||
Duplicate sheet, autonumber sheet, record data on another sheet | Excel Worksheet Functions | |||
How do I select price from sheet.b where sheet.a part no = sheet.b | Excel Worksheet Functions | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) | |||
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B | Excel Programming |