Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Array Formula for Counting Blank & Non Blank Cells (Multiple Criteria) foofoo Excel Discussion (Misc queries) 3 February 20th 12 08:03 PM
Excel 2002: Return blank when VLOOKUP on blank cells Mr. Low Excel Discussion (Misc queries) 2 June 4th 09 05:12 PM
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... [email protected][_2_] Excel Programming 2 June 7th 07 09:27 PM
Macro code to test for blank row and insert blank row if false Mattie Excel Programming 2 March 29th 06 01:19 AM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"