PC Review


Reply
Thread Tools Rate Thread

do loop until empty cell

 
 
Helmut
Guest
Posts: n/a
 
      8th Jan 2008
I want to execute the following until the cell in Column E is EMPTY.

Range("E11").Select
ActiveCell.FormulaR1C1 = "=+jan!RC+jan!RC[2]" (where jan is the
'PREVIOUS' sheet
Range("G11:H11").Select
Selection.ClearContents
Range("E12").Select
ActiveCell.FormulaR1C1 = "=+éðåÃ*ø!RC+éðåÃ*ø!RC[2]"
Range("G12:H12").Select
Selection.ClearContents
Range("E13").Select

 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      8th Jan 2008
RowCount = 11
do while Range("E" & RowCount) <> ""
Range("E" & RowCount).FormulaR1C1 = "=+jan!RC+jan!RC[2]"
Range("G" & RowCount).ClearContents
Range("H" & RowCount).ClearContents

RowCount = RowCount + 1
loop

"Helmut" wrote:

> I want to execute the following until the cell in Column E is EMPTY.
>
> Range("E11").Select
> ActiveCell.FormulaR1C1 = "=+jan!RC+jan!RC[2]" (where jan is the
> 'PREVIOUS' sheet
> Range("G11:H11").Select
> Selection.ClearContents
> Range("E12").Select
> ActiveCell.FormulaR1C1 = "=+éðåÃ*ø!RC+éðåÃ*ø!RC[2]"
> Range("G12:H12").Select
> Selection.ClearContents
> Range("E13").Select
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      8th Jan 2008
With ActiveSheet

lastrow = .Cells(.Rows.Count, "E").End(xlUp).Row
.Range("E11").Resize(lastrow - 10).FormulaR1C1 = "=jan!RC+jan!RC[2]"
.Range("G11").Resize(lastrow - 10, 2).ClearContents
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Helmut" <(E-Mail Removed)> wrote in message
news:26638EC1-6808-4786-83B3-(E-Mail Removed)...
>I want to execute the following until the cell in Column E is EMPTY.
>
> Range("E11").Select
> ActiveCell.FormulaR1C1 = "=+jan!RC+jan!RC[2]" (where jan is the
> 'PREVIOUS' sheet
> Range("G11:H11").Select
> Selection.ClearContents
> Range("E12").Select
> ActiveCell.FormulaR1C1 = "=+éðåàø!RC+éðåàø!RC[2]"
> Range("G12:H12").Select
> Selection.ClearContents
> Range("E13").Select
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
find empty cells in a column then append row that empty cell is in vbnewbie Microsoft Excel Programming 9 29th Jan 2009 09:27 AM
Loop until cell is empty Ricky Pang Microsoft Excel Programming 6 12th May 2006 05:14 PM
Loop to find next empty cell to the right not working. Casey Microsoft Excel Programming 3 4th May 2006 03:16 PM
Finding next empty empty cell in a range of columns =?Utf-8?B?VW5jbGVCdW4=?= Microsoft Excel Programming 1 13th Jan 2006 11:22 PM
having probelms getting my loop to terminate on an array value read from an empty cell mizcrab Microsoft Excel Programming 5 30th Nov 2005 02:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 AM.