Without a sample workbook and the rest of the macro, it's still just guessing (you can attach one -- look at #2 in my signature)

I assume that since you used .Cells() in your sample that you were inside a With / End With

If not, then try


With Worksheets("Data")
sAddr = "Data!" & Range(.Cells(40, 23), .Cells(i, 23)).Address
End With