ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Do Until Loop (https://www.excelbanter.com/excel-programming/297975-re-do-until-loop.html)

pikus

Do Until Loop
 
Do Until ActiveCell.Value = Null
Windows("AttorneyBatchTrack 2004_04.xls").Activate
ActiveCell.Offset(24, 0).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Attorney Gross Plotting by Placement 2004_04.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:
_
False, Transpose:=False
Windows("AttorneyBatchTrack 2004_04.xls").Activate
ActiveCell.Offset(0, 1).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Attorney Gross Plotting by Placement 2004_04.xls").Activate
ActiveCell.Offset(-1, 2).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:
_
False, Transpose:=False
Loo

--
Message posted from http://www.ExcelForum.com


Don Guillett[_4_]

Do Until Loop
 
Assuming this works you should also try to remove your selections, where
possible.

Windows("AttorneyBatchTrack 2004_04.xls").Activate
ActiveCell.Offset(24, 0).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Attorney Gross Plotting by Placement 2004_04.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
can be this ONE liner. correct for your names.
workbooks("destination.xls").sheets("destination") . _
range("a1").value= _
workbooks("source.xls").sheets("source"). _
range("a1").value
===same with copy
workbooks("source.xls").sheets("source"). _
range("a1:x16").copy workbooks("destination.xls"). _
sheets("destination").range("a1")

--
Don Guillett
SalesAid Software

"pikus " wrote in message
...
Do Until ActiveCell.Value = Null
Windows("AttorneyBatchTrack 2004_04.xls").Activate
ActiveCell.Offset(24, 0).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Attorney Gross Plotting by Placement 2004_04.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Windows("AttorneyBatchTrack 2004_04.xls").Activate
ActiveCell.Offset(0, 1).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Attorney Gross Plotting by Placement 2004_04.xls").Activate
ActiveCell.Offset(-1, 2).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Loop


---
Message posted from
http://www.ExcelForum.com/





All times are GMT +1. The time now is 04:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com