Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is there a way that using vba, i would like to copy the particular cell range from worksheet1 and paste into the new workbook? Also, how to ensure that the particular cell range that i copy will contains text instead of empty cell? many thanks. regards, Ven |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ven,
like this? Sub Copyc3d4() if not isempty(Worksheets("Sheet1").Range("c3")) then Worksheets("Sheet1").Range("c3").copy _ Destination:=Activeworkbook.Worksheets("Sheet2").R ange("d4") else Beep endif end with End sub -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Ven wrote : Hi, Is there a way that using vba, i would like to copy the particular cell range from worksheet1 and paste into the new workbook? Also, how to ensure that the particular cell range that i copy will contains text instead of empty cell? many thanks. regards, Ven |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
thanks a million. Is there a way to actually copy to a new excel file? Also, as the original excel file(data that i copy from ) consists of other worksheets and how can VBA be coded in such a way that will append to new row on the new excel file after copy data from sheet1 and follow by copy data from sheet2? many thanks. regards, Ven -----Original Message----- Ven, like this? Sub Copyc3d4() if not isempty(Worksheets("Sheet1").Range("c3")) then Worksheets("Sheet1").Range("c3").copy _ Destination:=Activeworkbook.Worksheets("Sheet2").R ange ("d4") else Beep endif end with End sub -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Ven wrote : Hi, Is there a way that using vba, i would like to copy the particular cell range from worksheet1 and paste into the new workbook? Also, how to ensure that the particular cell range that i copy will contains text instead of empty cell? many thanks. regards, Ven . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() this goes on a cell by cell basis.. which I doubt is what you really want.. :( But since you dont specify which cells need to be copied i can do no more... thus I fear that you come back for more.. Please next time : define your problem more exact THEN ask for answer. Also buy a book. These thing may be complicated for you now, but if you study the fundamentals of VBA for a week or so.. you can also understand it and even do it yourself... Sub CopyToNew() Dim wbSrc As Workbook Dim wsSrc As Worksheet Dim wsTgt As Worksheet Set wbSrc = ActiveWorkbook Set wsTgt = Workbooks.Add(xlWBATWorksheet).Worksheets(1) For Each wsSrc In wbSrc.Worksheets With wsSrc.Range("A3") If Not IsEmpty(.Value) Then .Copy wsTgt.Cells(Rows.Count, 1).End(xlUp) End If End With Next End Sub -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Ven wrote : Hi, thanks a million. Is there a way to actually copy to a new excel file? Also, as the original excel file(data that i copy from ) consists of other worksheets and how can VBA be coded in such a way that will append to new row on the new excel file after copy data from sheet1 and follow by copy data from sheet2? many thanks. regards, Ven |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|