Quote:I am getting run time error 1004. While VBA debugging ...
While in debugger, open the 'Local Variables' window and inspect the values of those variables.
It will tell you what your code was doing.
Since your code depend on cells values, we can only guess what is going on without knowing the variables values.
The function ConvertToLetter you use is wrong, it need to be rewritten, or use available functions.
Try to use:
Cells(1, 1).Address(RowAbsolute:=False, ColumnAbsolute:=False)