Christiaan
Board Regular
- Joined
- Nov 5, 2012
- Messages
- 81
Hello all.
I am trying to compile a VBA-code that will go down a column, find an empty cell, write the row-number and continues.
Once the first column is finished, it should 'jump' to the next column, until there are no more columns left.
I did get the code working to write the empty cell row-numbers, including the offset. But I'm getting stuck on looping over the columns.
Any ideas would be greatly appreciated!
This is the code I have so far:
I am trying to compile a VBA-code that will go down a column, find an empty cell, write the row-number and continues.
Once the first column is finished, it should 'jump' to the next column, until there are no more columns left.
I did get the code working to write the empty cell row-numbers, including the offset. But I'm getting stuck on looping over the columns.
Any ideas would be greatly appreciated!
This is the code I have so far:
Code:
Sub FindEmptyRowNumbers()
Dim i As Integer
Dim j As Integer
Dim RowCount As Integer
RowCount = Worksheets("Sheet1").Range("A1").CurrentRegion.Rows.Count
Worksheets("References").Range("A8").Select
j = 1
For i = 1 To RowCount
If Worksheets("Sheet1").Range("C" & i).Value = "" Then
ActiveCell.Offset(0, j).Value = i
j = j + 1
End If
Next
End Sub