ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   do until blank (https://www.excelbanter.com/excel-programming/416389-do-until-blank.html)

[email protected]

do until blank
 
Hey

I need some code for the following:

I have a work book A.xls sheet B
I need to find the last non blank cell in column A and then cut that
row into work book C.xls sheet D
Then I need to loop through this until Column A in workbook A.xls
sheet B is empty

Should be easy but I have not clue how to do this

Please help

MarkS

do until blank
 
Try this

iCounter = 1
do until Range("A" & iCounter).value = ""
iCounter = iCounter + 1
loop

iCounter wil now have the tow number of the first blank cell

" wrote:

Hey

I need some code for the following:

I have a work book A.xls sheet B
I need to find the last non blank cell in column A and then cut that
row into work book C.xls sheet D
Then I need to loop through this until Column A in workbook A.xls
sheet B is empty

Should be easy but I have not clue how to do this

Please help


[email protected]

do until blank
 
Not working for me

Please look at code and tell me why I cant do this....

Thanks

Workbooks("P124.xls").Activate
Sheets("Copy of Cycles with problems").Select

icounter = 1
Do Until Range("A" & icounter).Value = ""
icounter = icounter + 1
icounter.Offset(0, -1).Select
ActiveCell.Offset(0, 0).Resize(1, 108).Cut
Workbooks("P124 Datalog trending.xls").Activate
Sheets("Cycles with no problems ").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Workbooks("P124.xls").Activate
Sheets("Copy of Cycles with problems").Select
Loop


All times are GMT +1. The time now is 10:01 PM.

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