Hi,

I am quite new to VBA and I am doing a loop to check cells that has data and consolidate it on a sheet. I have here a code that returns object not found. What am i missing?

Dim colNum As Integer
Dim rowNum As Integer
Dim x As Integer

x = 0
colNum = 0
rowNum = 0

'Set Source = ThisWorkbook.Worksheets("source")

For colNum = 1 To 10000
    For rowNum = 1 To 10000
        If thisSheet.Cells(rowNum, colNum).Value <> Empty Then
            sheetToOrg.Cells(x, 1) = thisSheet.Cells(rowNum, colNum).Value
            x = x + 1
        End If
    Next rowNum
Next colNum