Worksheets("Output").Range("C" & j) = Range(cells(i & lCol)).Value
I am writing a VBA code to help build out some dashboards. The point where I am getting messed up is copying values from one worksheet to another. I need to copy two values over. One is the first column, whatever row the For loop is on. The second is the same row, but whatever the last column in the data is. I have successfully copied over the first value, but not the second.
I checked, and my variable for last column (lCol) is pulling correctly and correctly identifying the last column. However, when I try to use it to specify the range I want to copy over, I get an error. I've tried a few different things, from using Range without Cells and using only Cells. All of them give me the same error.
Anyone know why I can't use lCol to specify the column in this case?