I'm having trouble with my declarations I think.
I can never decide if it should be a Long or Range or Cell etc etc.
I am struggling to get the attached code working as I keep getting "application defined or object defined error", which I presume means I got it wrong again regarding my declarations.
As always any pointers are greatly appreciated, and maybe someone could point me in the right direction of any articles helping me understand Excel VBA declarations.
Dim x As RangeDim ws As WorksheetDim lr As LongSet ws = ThisWorkbook.Sheets("Data")lr = ws.Range("T1048576").End(xlUp).Row For Each x In ws.Range("T3:T" & lr).Cells If x.Value <> 0 Then ws.Range("AL1048576").End(xlUp).Offset(1).vlaue = x.Offset(1).Value End If Next x