do loop until empty cell

  • Thread starter Thread starter Helmut
  • Start date Start date
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
 
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
 
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)
 
Back
Top