do loop until empty cell

H

Helmut

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
 
J

Joel

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top